imate
C++/CUDA Reference
py_c_linear_operator.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.36 */
2 
3 /* BEGIN: Cython Metadata
4 {
5  "distutils": {
6  "define_macros": [
7  [
8  "NPY_NO_DEPRECATED_API",
9  "NPY_1_7_API_VERSION"
10  ],
11  [
12  "CYTHON_EXTERN_C",
13  "extern \"C\""
14  ],
15  [
16  "NPY_NO_DEPRECATED_API",
17  "NPY_1_7_API_VERSION"
18  ],
19  [
20  "CYTHON_EXTERN_C",
21  "extern \"C\""
22  ],
23  [
24  "NPY_NO_DEPRECATED_API",
25  "NPY_1_7_API_VERSION"
26  ],
27  [
28  "CYTHON_EXTERN_C",
29  "extern \"C\""
30  ],
31  [
32  "NPY_NO_DEPRECATED_API",
33  "NPY_1_7_API_VERSION"
34  ],
35  [
36  "CYTHON_EXTERN_C",
37  "extern \"C\""
38  ],
39  [
40  "NPY_NO_DEPRECATED_API",
41  "NPY_1_7_API_VERSION"
42  ],
43  [
44  "CYTHON_EXTERN_C",
45  "extern \"C\""
46  ],
47  [
48  "NPY_NO_DEPRECATED_API",
49  "NPY_1_7_API_VERSION"
50  ],
51  [
52  "CYTHON_EXTERN_C",
53  "extern \"C\""
54  ],
55  [
56  "NPY_NO_DEPRECATED_API",
57  "NPY_1_7_API_VERSION"
58  ],
59  [
60  "CYTHON_EXTERN_C",
61  "extern \"C\""
62  ],
63  [
64  "NPY_NO_DEPRECATED_API",
65  "NPY_1_7_API_VERSION"
66  ],
67  [
68  "CYTHON_EXTERN_C",
69  "extern \"C\""
70  ],
71  [
72  "NPY_NO_DEPRECATED_API",
73  "NPY_1_7_API_VERSION"
74  ],
75  [
76  "CYTHON_EXTERN_C",
77  "extern \"C\""
78  ],
79  [
80  "NPY_NO_DEPRECATED_API",
81  "NPY_1_7_API_VERSION"
82  ],
83  [
84  "CYTHON_EXTERN_C",
85  "extern \"C\""
86  ],
87  [
88  "NPY_NO_DEPRECATED_API",
89  "NPY_1_7_API_VERSION"
90  ],
91  [
92  "CYTHON_EXTERN_C",
93  "extern \"C\""
94  ],
95  [
96  "NPY_NO_DEPRECATED_API",
97  "NPY_1_7_API_VERSION"
98  ],
99  [
100  "CYTHON_EXTERN_C",
101  "extern \"C\""
102  ],
103  [
104  "NPY_NO_DEPRECATED_API",
105  "NPY_1_7_API_VERSION"
106  ],
107  [
108  "CYTHON_EXTERN_C",
109  "extern \"C\""
110  ],
111  [
112  "NPY_NO_DEPRECATED_API",
113  "NPY_1_7_API_VERSION"
114  ],
115  [
116  "CYTHON_EXTERN_C",
117  "extern \"C\""
118  ],
119  [
120  "NPY_NO_DEPRECATED_API",
121  "NPY_1_7_API_VERSION"
122  ],
123  [
124  "CYTHON_EXTERN_C",
125  "extern \"C\""
126  ]
127  ],
128  "depends": [
129  "imate/_c_linear_operator/c_linear_operator.h"
130  ],
131  "include_dirs": [
132  "./imate/_c_linear_operator",
133  "i",
134  "m",
135  "a",
136  "t",
137  "e",
138  "/",
139  "_",
140  "c",
141  "b",
142  "s",
143  "l",
144  "g",
145  "r"
146  ],
147  "language": "c++",
148  "name": "imate._c_linear_operator.py_c_linear_operator",
149  "sources": [
150  "./imate/_c_linear_operator/py_c_linear_operator.pyx",
151  "./imate/_c_linear_operator/c_dense_matrix.cpp",
152  "./imate/_c_linear_operator/c_dense_affine_matrix_function.cpp",
153  "./imate/_c_linear_operator/c_affine_matrix_function.cpp",
154  "./imate/_c_linear_operator/c_matrix.cpp",
155  "./imate/_c_linear_operator/c_csr_affine_matrix_function.cpp",
156  "./imate/_c_linear_operator/c_linear_operator.cpp",
157  "./imate/_c_linear_operator/c_csc_affine_matrix_function.cpp",
158  "./imate/_c_linear_operator/c_csc_matrix.cpp",
159  "./imate/_c_linear_operator/c_csr_matrix.cpp",
160  "imate/_c_basic_algebra/c_vector_operations.cpp",
161  "imate/_c_basic_algebra/cblas_interface.cpp",
162  "imate/_c_basic_algebra/c_matrix_operations.cpp"
163  ]
164  },
165  "module_name": "imate._c_linear_operator.py_c_linear_operator"
166 }
167 END: Cython Metadata */
168 
169 #ifndef PY_SSIZE_T_CLEAN
170 #define PY_SSIZE_T_CLEAN
171 #endif /* PY_SSIZE_T_CLEAN */
172 #include "Python.h"
173 #ifndef Py_PYTHON_H
174  #error Python headers needed to compile C extensions, please install development version of Python.
175 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
176  #error Cython requires Python 2.6+ or Python 3.3+.
177 #else
178 #define CYTHON_ABI "0_29_36"
179 #define CYTHON_HEX_VERSION 0x001D24F0
180 #define CYTHON_FUTURE_DIVISION 1
181 #include <stddef.h>
182 #ifndef offsetof
183  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
184 #endif
185 #if !defined(WIN32) && !defined(MS_WINDOWS)
186  #ifndef __stdcall
187  #define __stdcall
188  #endif
189  #ifndef __cdecl
190  #define __cdecl
191  #endif
192  #ifndef __fastcall
193  #define __fastcall
194  #endif
195 #endif
196 #ifndef DL_IMPORT
197  #define DL_IMPORT(t) t
198 #endif
199 #ifndef DL_EXPORT
200  #define DL_EXPORT(t) t
201 #endif
202 #define __PYX_COMMA ,
203 #ifndef HAVE_LONG_LONG
204  #if PY_VERSION_HEX >= 0x02070000
205  #define HAVE_LONG_LONG
206  #endif
207 #endif
208 #ifndef PY_LONG_LONG
209  #define PY_LONG_LONG LONG_LONG
210 #endif
211 #ifndef Py_HUGE_VAL
212  #define Py_HUGE_VAL HUGE_VAL
213 #endif
214 #ifdef PYPY_VERSION
215  #define CYTHON_COMPILING_IN_PYPY 1
216  #define CYTHON_COMPILING_IN_PYSTON 0
217  #define CYTHON_COMPILING_IN_CPYTHON 0
218  #define CYTHON_COMPILING_IN_NOGIL 0
219  #undef CYTHON_USE_TYPE_SLOTS
220  #define CYTHON_USE_TYPE_SLOTS 0
221  #undef CYTHON_USE_PYTYPE_LOOKUP
222  #define CYTHON_USE_PYTYPE_LOOKUP 0
223  #if PY_VERSION_HEX < 0x03050000
224  #undef CYTHON_USE_ASYNC_SLOTS
225  #define CYTHON_USE_ASYNC_SLOTS 0
226  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
227  #define CYTHON_USE_ASYNC_SLOTS 1
228  #endif
229  #undef CYTHON_USE_PYLIST_INTERNALS
230  #define CYTHON_USE_PYLIST_INTERNALS 0
231  #undef CYTHON_USE_UNICODE_INTERNALS
232  #define CYTHON_USE_UNICODE_INTERNALS 0
233  #undef CYTHON_USE_UNICODE_WRITER
234  #define CYTHON_USE_UNICODE_WRITER 0
235  #undef CYTHON_USE_PYLONG_INTERNALS
236  #define CYTHON_USE_PYLONG_INTERNALS 0
237  #undef CYTHON_AVOID_BORROWED_REFS
238  #define CYTHON_AVOID_BORROWED_REFS 1
239  #undef CYTHON_ASSUME_SAFE_MACROS
240  #define CYTHON_ASSUME_SAFE_MACROS 0
241  #undef CYTHON_UNPACK_METHODS
242  #define CYTHON_UNPACK_METHODS 0
243  #undef CYTHON_FAST_THREAD_STATE
244  #define CYTHON_FAST_THREAD_STATE 0
245  #undef CYTHON_FAST_PYCALL
246  #define CYTHON_FAST_PYCALL 0
247  #if PY_VERSION_HEX < 0x03090000
248  #undef CYTHON_PEP489_MULTI_PHASE_INIT
249  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
250  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
251  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
252  #endif
253  #undef CYTHON_USE_TP_FINALIZE
254  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
255  #undef CYTHON_USE_DICT_VERSIONS
256  #define CYTHON_USE_DICT_VERSIONS 0
257  #undef CYTHON_USE_EXC_INFO_STACK
258  #define CYTHON_USE_EXC_INFO_STACK 0
259  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
260  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
261  #endif
262 #elif defined(PYSTON_VERSION)
263  #define CYTHON_COMPILING_IN_PYPY 0
264  #define CYTHON_COMPILING_IN_PYSTON 1
265  #define CYTHON_COMPILING_IN_CPYTHON 0
266  #define CYTHON_COMPILING_IN_NOGIL 0
267  #ifndef CYTHON_USE_TYPE_SLOTS
268  #define CYTHON_USE_TYPE_SLOTS 1
269  #endif
270  #undef CYTHON_USE_PYTYPE_LOOKUP
271  #define CYTHON_USE_PYTYPE_LOOKUP 0
272  #undef CYTHON_USE_ASYNC_SLOTS
273  #define CYTHON_USE_ASYNC_SLOTS 0
274  #undef CYTHON_USE_PYLIST_INTERNALS
275  #define CYTHON_USE_PYLIST_INTERNALS 0
276  #ifndef CYTHON_USE_UNICODE_INTERNALS
277  #define CYTHON_USE_UNICODE_INTERNALS 1
278  #endif
279  #undef CYTHON_USE_UNICODE_WRITER
280  #define CYTHON_USE_UNICODE_WRITER 0
281  #undef CYTHON_USE_PYLONG_INTERNALS
282  #define CYTHON_USE_PYLONG_INTERNALS 0
283  #ifndef CYTHON_AVOID_BORROWED_REFS
284  #define CYTHON_AVOID_BORROWED_REFS 0
285  #endif
286  #ifndef CYTHON_ASSUME_SAFE_MACROS
287  #define CYTHON_ASSUME_SAFE_MACROS 1
288  #endif
289  #ifndef CYTHON_UNPACK_METHODS
290  #define CYTHON_UNPACK_METHODS 1
291  #endif
292  #undef CYTHON_FAST_THREAD_STATE
293  #define CYTHON_FAST_THREAD_STATE 0
294  #undef CYTHON_FAST_PYCALL
295  #define CYTHON_FAST_PYCALL 0
296  #undef CYTHON_PEP489_MULTI_PHASE_INIT
297  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
298  #undef CYTHON_USE_TP_FINALIZE
299  #define CYTHON_USE_TP_FINALIZE 0
300  #undef CYTHON_USE_DICT_VERSIONS
301  #define CYTHON_USE_DICT_VERSIONS 0
302  #undef CYTHON_USE_EXC_INFO_STACK
303  #define CYTHON_USE_EXC_INFO_STACK 0
304  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
305  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
306  #endif
307 #elif defined(PY_NOGIL)
308  #define CYTHON_COMPILING_IN_PYPY 0
309  #define CYTHON_COMPILING_IN_PYSTON 0
310  #define CYTHON_COMPILING_IN_CPYTHON 0
311  #define CYTHON_COMPILING_IN_NOGIL 1
312  #ifndef CYTHON_USE_TYPE_SLOTS
313  #define CYTHON_USE_TYPE_SLOTS 1
314  #endif
315  #undef CYTHON_USE_PYTYPE_LOOKUP
316  #define CYTHON_USE_PYTYPE_LOOKUP 0
317  #ifndef CYTHON_USE_ASYNC_SLOTS
318  #define CYTHON_USE_ASYNC_SLOTS 1
319  #endif
320  #undef CYTHON_USE_PYLIST_INTERNALS
321  #define CYTHON_USE_PYLIST_INTERNALS 0
322  #ifndef CYTHON_USE_UNICODE_INTERNALS
323  #define CYTHON_USE_UNICODE_INTERNALS 1
324  #endif
325  #undef CYTHON_USE_UNICODE_WRITER
326  #define CYTHON_USE_UNICODE_WRITER 0
327  #undef CYTHON_USE_PYLONG_INTERNALS
328  #define CYTHON_USE_PYLONG_INTERNALS 0
329  #ifndef CYTHON_AVOID_BORROWED_REFS
330  #define CYTHON_AVOID_BORROWED_REFS 0
331  #endif
332  #ifndef CYTHON_ASSUME_SAFE_MACROS
333  #define CYTHON_ASSUME_SAFE_MACROS 1
334  #endif
335  #ifndef CYTHON_UNPACK_METHODS
336  #define CYTHON_UNPACK_METHODS 1
337  #endif
338  #undef CYTHON_FAST_THREAD_STATE
339  #define CYTHON_FAST_THREAD_STATE 0
340  #undef CYTHON_FAST_PYCALL
341  #define CYTHON_FAST_PYCALL 0
342  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
343  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
344  #endif
345  #ifndef CYTHON_USE_TP_FINALIZE
346  #define CYTHON_USE_TP_FINALIZE 1
347  #endif
348  #undef CYTHON_USE_DICT_VERSIONS
349  #define CYTHON_USE_DICT_VERSIONS 0
350  #undef CYTHON_USE_EXC_INFO_STACK
351  #define CYTHON_USE_EXC_INFO_STACK 0
352 #else
353  #define CYTHON_COMPILING_IN_PYPY 0
354  #define CYTHON_COMPILING_IN_PYSTON 0
355  #define CYTHON_COMPILING_IN_CPYTHON 1
356  #define CYTHON_COMPILING_IN_NOGIL 0
357  #ifndef CYTHON_USE_TYPE_SLOTS
358  #define CYTHON_USE_TYPE_SLOTS 1
359  #endif
360  #if PY_VERSION_HEX < 0x02070000
361  #undef CYTHON_USE_PYTYPE_LOOKUP
362  #define CYTHON_USE_PYTYPE_LOOKUP 0
363  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
364  #define CYTHON_USE_PYTYPE_LOOKUP 1
365  #endif
366  #if PY_MAJOR_VERSION < 3
367  #undef CYTHON_USE_ASYNC_SLOTS
368  #define CYTHON_USE_ASYNC_SLOTS 0
369  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
370  #define CYTHON_USE_ASYNC_SLOTS 1
371  #endif
372  #if PY_VERSION_HEX < 0x02070000
373  #undef CYTHON_USE_PYLONG_INTERNALS
374  #define CYTHON_USE_PYLONG_INTERNALS 0
375  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
376  #define CYTHON_USE_PYLONG_INTERNALS (PY_VERSION_HEX < 0x030C00A5)
377  #endif
378  #ifndef CYTHON_USE_PYLIST_INTERNALS
379  #define CYTHON_USE_PYLIST_INTERNALS 1
380  #endif
381  #ifndef CYTHON_USE_UNICODE_INTERNALS
382  #define CYTHON_USE_UNICODE_INTERNALS 1
383  #endif
384  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
385  #undef CYTHON_USE_UNICODE_WRITER
386  #define CYTHON_USE_UNICODE_WRITER 0
387  #elif !defined(CYTHON_USE_UNICODE_WRITER)
388  #define CYTHON_USE_UNICODE_WRITER 1
389  #endif
390  #ifndef CYTHON_AVOID_BORROWED_REFS
391  #define CYTHON_AVOID_BORROWED_REFS 0
392  #endif
393  #ifndef CYTHON_ASSUME_SAFE_MACROS
394  #define CYTHON_ASSUME_SAFE_MACROS 1
395  #endif
396  #ifndef CYTHON_UNPACK_METHODS
397  #define CYTHON_UNPACK_METHODS 1
398  #endif
399  #if PY_VERSION_HEX >= 0x030B00A4
400  #undef CYTHON_FAST_THREAD_STATE
401  #define CYTHON_FAST_THREAD_STATE 0
402  #elif !defined(CYTHON_FAST_THREAD_STATE)
403  #define CYTHON_FAST_THREAD_STATE 1
404  #endif
405  #ifndef CYTHON_FAST_PYCALL
406  #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
407  #endif
408  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
409  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
410  #endif
411  #ifndef CYTHON_USE_TP_FINALIZE
412  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
413  #endif
414  #ifndef CYTHON_USE_DICT_VERSIONS
415  #define CYTHON_USE_DICT_VERSIONS ((PY_VERSION_HEX >= 0x030600B1) && (PY_VERSION_HEX < 0x030C00A5))
416  #endif
417  #if PY_VERSION_HEX >= 0x030B00A4
418  #undef CYTHON_USE_EXC_INFO_STACK
419  #define CYTHON_USE_EXC_INFO_STACK 0
420  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
421  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
422  #endif
423  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
424  #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
425  #endif
426 #endif
427 #if !defined(CYTHON_FAST_PYCCALL)
428 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
429 #endif
430 #if CYTHON_USE_PYLONG_INTERNALS
431  #if PY_MAJOR_VERSION < 3
432  #include "longintrepr.h"
433  #endif
434  #undef SHIFT
435  #undef BASE
436  #undef MASK
437  #ifdef SIZEOF_VOID_P
438  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
439  #endif
440 #endif
441 #ifndef __has_attribute
442  #define __has_attribute(x) 0
443 #endif
444 #ifndef __has_cpp_attribute
445  #define __has_cpp_attribute(x) 0
446 #endif
447 #ifndef CYTHON_RESTRICT
448  #if defined(__GNUC__)
449  #define CYTHON_RESTRICT __restrict__
450  #elif defined(_MSC_VER) && _MSC_VER >= 1400
451  #define CYTHON_RESTRICT __restrict
452  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
453  #define CYTHON_RESTRICT restrict
454  #else
455  #define CYTHON_RESTRICT
456  #endif
457 #endif
458 #ifndef CYTHON_UNUSED
459 # if defined(__GNUC__)
460 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
461 # define CYTHON_UNUSED __attribute__ ((__unused__))
462 # else
463 # define CYTHON_UNUSED
464 # endif
465 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
466 # define CYTHON_UNUSED __attribute__ ((__unused__))
467 # else
468 # define CYTHON_UNUSED
469 # endif
470 #endif
471 #ifndef CYTHON_MAYBE_UNUSED_VAR
472 # if defined(__cplusplus)
473  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
474 # else
475 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
476 # endif
477 #endif
478 #ifndef CYTHON_NCP_UNUSED
479 # if CYTHON_COMPILING_IN_CPYTHON
480 # define CYTHON_NCP_UNUSED
481 # else
482 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
483 # endif
484 #endif
485 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
486 #ifdef _MSC_VER
487  #ifndef _MSC_STDINT_H_
488  #if _MSC_VER < 1300
489  typedef unsigned char uint8_t;
490  typedef unsigned int uint32_t;
491  #else
492  typedef unsigned __int8 uint8_t;
493  typedef unsigned __int32 uint32_t;
494  #endif
495  #endif
496 #else
497  #include <stdint.h>
498 #endif
499 #ifndef CYTHON_FALLTHROUGH
500  #if defined(__cplusplus) && __cplusplus >= 201103L
501  #if __has_cpp_attribute(fallthrough)
502  #define CYTHON_FALLTHROUGH [[fallthrough]]
503  #elif __has_cpp_attribute(clang::fallthrough)
504  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
505  #elif __has_cpp_attribute(gnu::fallthrough)
506  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
507  #endif
508  #endif
509  #ifndef CYTHON_FALLTHROUGH
510  #if __has_attribute(fallthrough)
511  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
512  #else
513  #define CYTHON_FALLTHROUGH
514  #endif
515  #endif
516  #if defined(__clang__ ) && defined(__apple_build_version__)
517  #if __apple_build_version__ < 7000000
518  #undef CYTHON_FALLTHROUGH
519  #define CYTHON_FALLTHROUGH
520  #endif
521  #endif
522 #endif
523 
524 #ifndef __cplusplus
525  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
526 #endif
527 #ifndef CYTHON_INLINE
528  #if defined(__clang__)
529  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
530  #else
531  #define CYTHON_INLINE inline
532  #endif
533 #endif
534 template<typename T>
535 void __Pyx_call_destructor(T& x) {
536  x.~T();
537 }
538 template<typename T>
539 class __Pyx_FakeReference {
540  public:
541  __Pyx_FakeReference() : ptr(NULL) { }
542  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
543  T *operator->() { return ptr; }
544  T *operator&() { return ptr; }
545  operator T&() { return *ptr; }
546  template<typename U> bool operator ==(U other) { return *ptr == other; }
547  template<typename U> bool operator !=(U other) { return *ptr != other; }
548  private:
549  T *ptr;
550 };
551 
552 #define __PYX_BUILD_PY_SSIZE_T "n"
553 #define CYTHON_FORMAT_SSIZE_T "z"
554 #if PY_MAJOR_VERSION < 3
555  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
556  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
557  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
558  #define __Pyx_DefaultClassType PyClass_Type
559 #else
560  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
561  #define __Pyx_DefaultClassType PyType_Type
562 #if PY_VERSION_HEX >= 0x030B00A1
563  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
564  PyObject *code, PyObject *c, PyObject* n, PyObject *v,
565  PyObject *fv, PyObject *cell, PyObject* fn,
566  PyObject *name, int fline, PyObject *lnos) {
567  PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
568  PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
569  const char *fn_cstr=NULL;
570  const char *name_cstr=NULL;
571  PyCodeObject* co=NULL;
572  PyObject *type, *value, *traceback;
573  PyErr_Fetch(&type, &value, &traceback);
574  if (!(kwds=PyDict_New())) goto end;
575  if (!(argcount=PyLong_FromLong(a))) goto end;
576  if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
577  if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
578  if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
579  if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
580  if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
581  if (!(nlocals=PyLong_FromLong(l))) goto end;
582  if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
583  if (!(stacksize=PyLong_FromLong(s))) goto end;
584  if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
585  if (!(flags=PyLong_FromLong(f))) goto end;
586  if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
587  if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
588  if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
589  if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
590  if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
591  if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
592  if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
593  if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
594  if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
595  if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
596  if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
597  if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
598  if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
599  if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
600  Py_XDECREF((PyObject*)co);
601  co = (PyCodeObject*)call_result;
602  call_result = NULL;
603  if (0) {
604  cleanup_code_too:
605  Py_XDECREF((PyObject*)co);
606  co = NULL;
607  }
608  end:
609  Py_XDECREF(kwds);
610  Py_XDECREF(argcount);
611  Py_XDECREF(posonlyargcount);
612  Py_XDECREF(kwonlyargcount);
613  Py_XDECREF(nlocals);
614  Py_XDECREF(stacksize);
615  Py_XDECREF(replace);
616  Py_XDECREF(call_result);
617  Py_XDECREF(empty);
618  if (type) {
619  PyErr_Restore(type, value, traceback);
620  }
621  return co;
622  }
623 #else
624  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
625  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
626 #endif
627  #define __Pyx_DefaultClassType PyType_Type
628 #endif
629 #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
630  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
631 #else
632  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
633 #endif
634 #ifndef Py_TPFLAGS_CHECKTYPES
635  #define Py_TPFLAGS_CHECKTYPES 0
636 #endif
637 #ifndef Py_TPFLAGS_HAVE_INDEX
638  #define Py_TPFLAGS_HAVE_INDEX 0
639 #endif
640 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
641  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
642 #endif
643 #ifndef Py_TPFLAGS_HAVE_FINALIZE
644  #define Py_TPFLAGS_HAVE_FINALIZE 0
645 #endif
646 #ifndef METH_STACKLESS
647  #define METH_STACKLESS 0
648 #endif
649 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
650  #ifndef METH_FASTCALL
651  #define METH_FASTCALL 0x80
652  #endif
653  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
654  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
655  Py_ssize_t nargs, PyObject *kwnames);
656 #else
657  #define __Pyx_PyCFunctionFast _PyCFunctionFast
658  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
659 #endif
660 #if CYTHON_FAST_PYCCALL
661 #define __Pyx_PyFastCFunction_Check(func)\
662  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
663 #else
664 #define __Pyx_PyFastCFunction_Check(func) 0
665 #endif
666 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
667  #define PyObject_Malloc(s) PyMem_Malloc(s)
668  #define PyObject_Free(p) PyMem_Free(p)
669  #define PyObject_Realloc(p) PyMem_Realloc(p)
670 #endif
671 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
672  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
673  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
674  #define PyMem_RawFree(p) PyMem_Free(p)
675 #endif
676 #if CYTHON_COMPILING_IN_PYSTON
677  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
678  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
679 #else
680  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
681  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
682 #endif
683 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
684  #define __Pyx_PyThreadState_Current PyThreadState_GET()
685 #elif PY_VERSION_HEX >= 0x03060000
686  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
687 #elif PY_VERSION_HEX >= 0x03000000
688  #define __Pyx_PyThreadState_Current PyThreadState_GET()
689 #else
690  #define __Pyx_PyThreadState_Current _PyThreadState_Current
691 #endif
692 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
693 #include "pythread.h"
694 #define Py_tss_NEEDS_INIT 0
695 typedef int Py_tss_t;
696 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
697  *key = PyThread_create_key();
698  return 0;
699 }
700 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
701  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
702  *key = Py_tss_NEEDS_INIT;
703  return key;
704 }
705 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
706  PyObject_Free(key);
707 }
708 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
709  return *key != Py_tss_NEEDS_INIT;
710 }
711 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
712  PyThread_delete_key(*key);
713  *key = Py_tss_NEEDS_INIT;
714 }
715 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
716  return PyThread_set_key_value(*key, value);
717 }
718 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
719  return PyThread_get_key_value(*key);
720 }
721 #endif
722 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
723 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
724 #else
725 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
726 #endif
727 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
728  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
729  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
730 #else
731  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
732  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
733 #endif
734 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
735 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
736 #else
737 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
738 #endif
739 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
740  #define CYTHON_PEP393_ENABLED 1
741  #if PY_VERSION_HEX >= 0x030C0000
742  #define __Pyx_PyUnicode_READY(op) (0)
743  #else
744  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
745  0 : _PyUnicode_Ready((PyObject *)(op)))
746  #endif
747  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
748  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
749  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
750  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
751  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
752  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
753  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
754  #if PY_VERSION_HEX >= 0x030C0000
755  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
756  #else
757  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
758  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
759  #else
760  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
761  #endif
762  #endif
763 #else
764  #define CYTHON_PEP393_ENABLED 0
765  #define PyUnicode_1BYTE_KIND 1
766  #define PyUnicode_2BYTE_KIND 2
767  #define PyUnicode_4BYTE_KIND 4
768  #define __Pyx_PyUnicode_READY(op) (0)
769  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
770  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
771  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
772  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
773  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
774  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
775  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
776  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
777 #endif
778 #if CYTHON_COMPILING_IN_PYPY
779  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
780  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
781 #else
782  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
783  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
784  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
785 #endif
786 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
787  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
788 #endif
789 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
790  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
791 #endif
792 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
793  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
794 #endif
795 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
796 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
797 #if PY_MAJOR_VERSION >= 3
798  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
799 #else
800  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
801 #endif
802 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
803  #define PyObject_ASCII(o) PyObject_Repr(o)
804 #endif
805 #if PY_MAJOR_VERSION >= 3
806  #define PyBaseString_Type PyUnicode_Type
807  #define PyStringObject PyUnicodeObject
808  #define PyString_Type PyUnicode_Type
809  #define PyString_Check PyUnicode_Check
810  #define PyString_CheckExact PyUnicode_CheckExact
811 #ifndef PyObject_Unicode
812  #define PyObject_Unicode PyObject_Str
813 #endif
814 #endif
815 #if PY_MAJOR_VERSION >= 3
816  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
817  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
818 #else
819  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
820  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
821 #endif
822 #ifndef PySet_CheckExact
823  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
824 #endif
825 #if PY_VERSION_HEX >= 0x030900A4
826  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
827  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
828 #else
829  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
830  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
831 #endif
832 #if CYTHON_ASSUME_SAFE_MACROS
833  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
834 #else
835  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
836 #endif
837 #if PY_MAJOR_VERSION >= 3
838  #define PyIntObject PyLongObject
839  #define PyInt_Type PyLong_Type
840  #define PyInt_Check(op) PyLong_Check(op)
841  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
842  #define PyInt_FromString PyLong_FromString
843  #define PyInt_FromUnicode PyLong_FromUnicode
844  #define PyInt_FromLong PyLong_FromLong
845  #define PyInt_FromSize_t PyLong_FromSize_t
846  #define PyInt_FromSsize_t PyLong_FromSsize_t
847  #define PyInt_AsLong PyLong_AsLong
848  #define PyInt_AS_LONG PyLong_AS_LONG
849  #define PyInt_AsSsize_t PyLong_AsSsize_t
850  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
851  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
852  #define PyNumber_Int PyNumber_Long
853 #endif
854 #if PY_MAJOR_VERSION >= 3
855  #define PyBoolObject PyLongObject
856 #endif
857 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
858  #ifndef PyUnicode_InternFromString
859  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
860  #endif
861 #endif
862 #if PY_VERSION_HEX < 0x030200A4
863  typedef long Py_hash_t;
864  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
865  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
866 #else
867  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
868  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
869 #endif
870 #if PY_MAJOR_VERSION >= 3
871  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
872 #else
873  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
874 #endif
875 #if CYTHON_USE_ASYNC_SLOTS
876  #if PY_VERSION_HEX >= 0x030500B1
877  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
878  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
879  #else
880  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
881  #endif
882 #else
883  #define __Pyx_PyType_AsAsync(obj) NULL
884 #endif
885 #ifndef __Pyx_PyAsyncMethodsStruct
886  typedef struct {
887  unaryfunc am_await;
888  unaryfunc am_aiter;
889  unaryfunc am_anext;
890  } __Pyx_PyAsyncMethodsStruct;
891 #endif
892 
893 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
894  #if !defined(_USE_MATH_DEFINES)
895  #define _USE_MATH_DEFINES
896  #endif
897 #endif
898 #include <math.h>
899 #ifdef NAN
900 #define __PYX_NAN() ((float) NAN)
901 #else
902 static CYTHON_INLINE float __PYX_NAN() {
903  float value;
904  memset(&value, 0xFF, sizeof(value));
905  return value;
906 }
907 #endif
908 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
909 #define __Pyx_truncl trunc
910 #else
911 #define __Pyx_truncl truncl
912 #endif
913 
914 #define __PYX_MARK_ERR_POS(f_index, lineno) \
915  { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
916 #define __PYX_ERR(f_index, lineno, Ln_error) \
917  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
918 
919 #ifndef __PYX_EXTERN_C
920  #ifdef __cplusplus
921  #define __PYX_EXTERN_C extern "C"
922  #else
923  #define __PYX_EXTERN_C extern
924  #endif
925 #endif
926 
927 #define __PYX_HAVE__imate___c_linear_operator__py_c_linear_operator
928 #define __PYX_HAVE_API__imate___c_linear_operator__py_c_linear_operator
929 /* Early includes */
930 #include "ios"
931 #include "new"
932 #include "stdexcept"
933 #include "typeinfo"
934 #include "c_linear_operator.h"
935 #include <string.h>
936 #include <stdlib.h>
937 #include "pythread.h"
938 #include <stdio.h>
939 #include "pystate.h"
940 #ifdef _OPENMP
941 #include <omp.h>
942 #endif /* _OPENMP */
943 
944 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
945 #define CYTHON_WITHOUT_ASSERTIONS
946 #endif
947 
948 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
949  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
950 
951 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
952 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
953 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
954 #define __PYX_DEFAULT_STRING_ENCODING ""
955 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
956 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
957 #define __Pyx_uchar_cast(c) ((unsigned char)c)
958 #define __Pyx_long_cast(x) ((long)x)
959 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
960  (sizeof(type) < sizeof(Py_ssize_t)) ||\
961  (sizeof(type) > sizeof(Py_ssize_t) &&\
962  likely(v < (type)PY_SSIZE_T_MAX ||\
963  v == (type)PY_SSIZE_T_MAX) &&\
964  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
965  v == (type)PY_SSIZE_T_MIN))) ||\
966  (sizeof(type) == sizeof(Py_ssize_t) &&\
967  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
968  v == (type)PY_SSIZE_T_MAX))) )
969 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
970  return (size_t) i < (size_t) limit;
971 }
972 #if defined (__cplusplus) && __cplusplus >= 201103L
973  #include <cstdlib>
974  #define __Pyx_sst_abs(value) std::abs(value)
975 #elif SIZEOF_INT >= SIZEOF_SIZE_T
976  #define __Pyx_sst_abs(value) abs(value)
977 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
978  #define __Pyx_sst_abs(value) labs(value)
979 #elif defined (_MSC_VER)
980  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
981 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
982  #define __Pyx_sst_abs(value) llabs(value)
983 #elif defined (__GNUC__)
984  #define __Pyx_sst_abs(value) __builtin_llabs(value)
985 #else
986  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
987 #endif
988 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
989 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
990 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
991 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
992 #define __Pyx_PyBytes_FromString PyBytes_FromString
993 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
994 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
995 #if PY_MAJOR_VERSION < 3
996  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
997  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
998 #else
999  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
1000  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
1001 #endif
1002 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
1003 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
1004 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
1005 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
1006 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
1007 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
1008 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
1009 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
1010 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
1011 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
1012 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
1013 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
1014 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
1015 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
1016 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
1017 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
1018 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
1019  const Py_UNICODE *u_end = u;
1020  while (*u_end++) ;
1021  return (size_t)(u_end - u - 1);
1022 }
1023 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
1024 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
1025 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
1026 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
1027 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
1028 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
1029 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
1030 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
1031 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
1032 #define __Pyx_PySequence_Tuple(obj)\
1033  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
1034 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
1035 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
1036 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
1037 #if CYTHON_ASSUME_SAFE_MACROS
1038 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
1039 #else
1040 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
1041 #endif
1042 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
1043 #if PY_MAJOR_VERSION >= 3
1044 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
1045 #else
1046 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
1047 #endif
1048 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
1049 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
1050 static int __Pyx_sys_getdefaultencoding_not_ascii;
1051 static int __Pyx_init_sys_getdefaultencoding_params(void) {
1052  PyObject* sys;
1053  PyObject* default_encoding = NULL;
1054  PyObject* ascii_chars_u = NULL;
1055  PyObject* ascii_chars_b = NULL;
1056  const char* default_encoding_c;
1057  sys = PyImport_ImportModule("sys");
1058  if (!sys) goto bad;
1059  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
1060  Py_DECREF(sys);
1061  if (!default_encoding) goto bad;
1062  default_encoding_c = PyBytes_AsString(default_encoding);
1063  if (!default_encoding_c) goto bad;
1064  if (strcmp(default_encoding_c, "ascii") == 0) {
1065  __Pyx_sys_getdefaultencoding_not_ascii = 0;
1066  } else {
1067  char ascii_chars[128];
1068  int c;
1069  for (c = 0; c < 128; c++) {
1070  ascii_chars[c] = c;
1071  }
1072  __Pyx_sys_getdefaultencoding_not_ascii = 1;
1073  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
1074  if (!ascii_chars_u) goto bad;
1075  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
1076  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
1077  PyErr_Format(
1078  PyExc_ValueError,
1079  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
1080  default_encoding_c);
1081  goto bad;
1082  }
1083  Py_DECREF(ascii_chars_u);
1084  Py_DECREF(ascii_chars_b);
1085  }
1086  Py_DECREF(default_encoding);
1087  return 0;
1088 bad:
1089  Py_XDECREF(default_encoding);
1090  Py_XDECREF(ascii_chars_u);
1091  Py_XDECREF(ascii_chars_b);
1092  return -1;
1093 }
1094 #endif
1095 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
1096 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
1097 #else
1098 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
1099 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
1100 static char* __PYX_DEFAULT_STRING_ENCODING;
1101 static int __Pyx_init_sys_getdefaultencoding_params(void) {
1102  PyObject* sys;
1103  PyObject* default_encoding = NULL;
1104  char* default_encoding_c;
1105  sys = PyImport_ImportModule("sys");
1106  if (!sys) goto bad;
1107  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
1108  Py_DECREF(sys);
1109  if (!default_encoding) goto bad;
1110  default_encoding_c = PyBytes_AsString(default_encoding);
1111  if (!default_encoding_c) goto bad;
1112  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
1113  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
1114  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
1115  Py_DECREF(default_encoding);
1116  return 0;
1117 bad:
1118  Py_XDECREF(default_encoding);
1119  return -1;
1120 }
1121 #endif
1122 #endif
1123 
1124 
1125 /* Test for GCC > 2.95 */
1126 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
1127  #define likely(x) __builtin_expect(!!(x), 1)
1128  #define unlikely(x) __builtin_expect(!!(x), 0)
1129 #else /* !__GNUC__ or GCC < 2.95 */
1130  #define likely(x) (x)
1131  #define unlikely(x) (x)
1132 #endif /* __GNUC__ */
1133 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
1134 
1135 static PyObject *__pyx_m = NULL;
1136 static PyObject *__pyx_d;
1137 static PyObject *__pyx_b;
1138 static PyObject *__pyx_cython_runtime = NULL;
1139 static PyObject *__pyx_empty_tuple;
1140 static PyObject *__pyx_empty_bytes;
1141 static PyObject *__pyx_empty_unicode;
1142 static int __pyx_lineno;
1143 static int __pyx_clineno = 0;
1144 static const char * __pyx_cfilenm= __FILE__;
1145 static const char *__pyx_filename;
1146 
1147 
1148 static const char *__pyx_f[] = {
1149  "imate/_c_linear_operator/py_c_linear_operator.pyx",
1150  "stringsource",
1151 };
1152 /* MemviewSliceStruct.proto */
1153 struct __pyx_memoryview_obj;
1154 typedef struct {
1155  struct __pyx_memoryview_obj *memview;
1156  char *data;
1157  Py_ssize_t shape[8];
1158  Py_ssize_t strides[8];
1159  Py_ssize_t suboffsets[8];
1160 } __Pyx_memviewslice;
1161 #define __Pyx_MemoryView_Len(m) (m.shape[0])
1162 
1163 /* Atomics.proto */
1164 #include <pythread.h>
1165 #ifndef CYTHON_ATOMICS
1166  #define CYTHON_ATOMICS 1
1167 #endif
1168 #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
1169 #define __pyx_atomic_int_type int
1170 #if CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
1171  (__GNUC_MINOR__ > 1 ||\
1172  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
1173  #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1)
1174  #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1)
1175  #ifdef __PYX_DEBUG_ATOMICS
1176  #warning "Using GNU atomics"
1177  #endif
1178 #elif CYTHON_ATOMICS && defined(_MSC_VER) && CYTHON_COMPILING_IN_NOGIL
1179  #include <intrin.h>
1180  #undef __pyx_atomic_int_type
1181  #define __pyx_atomic_int_type long
1182  #pragma intrinsic (_InterlockedExchangeAdd)
1183  #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1)
1184  #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1)
1185  #ifdef __PYX_DEBUG_ATOMICS
1186  #pragma message ("Using MSVC atomics")
1187  #endif
1188 #else
1189  #undef CYTHON_ATOMICS
1190  #define CYTHON_ATOMICS 0
1191  #ifdef __PYX_DEBUG_ATOMICS
1192  #warning "Not using atomics"
1193  #endif
1194 #endif
1195 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1196 #if CYTHON_ATOMICS
1197  #define __pyx_add_acquisition_count(memview)\
1198  __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview))
1199  #define __pyx_sub_acquisition_count(memview)\
1200  __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview))
1201 #else
1202  #define __pyx_add_acquisition_count(memview)\
1203  __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1204  #define __pyx_sub_acquisition_count(memview)\
1205  __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1206 #endif
1207 
1208 /* ForceInitThreads.proto */
1209 #ifndef __PYX_FORCE_INIT_THREADS
1210  #define __PYX_FORCE_INIT_THREADS 0
1211 #endif
1212 
1213 /* NoFastGil.proto */
1214 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
1215 #define __Pyx_PyGILState_Release PyGILState_Release
1216 #define __Pyx_FastGIL_Remember()
1217 #define __Pyx_FastGIL_Forget()
1218 #define __Pyx_FastGilFuncInit()
1219 
1220 /* BufferFormatStructs.proto */
1221 #define IS_UNSIGNED(type) (((type) -1) > 0)
1222 struct __Pyx_StructField_;
1223 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
1224 typedef struct {
1225  const char* name;
1226  struct __Pyx_StructField_* fields;
1227  size_t size;
1228  size_t arraysize[8];
1229  int ndim;
1230  char typegroup;
1231  char is_unsigned;
1232  int flags;
1233 } __Pyx_TypeInfo;
1234 typedef struct __Pyx_StructField_ {
1235  __Pyx_TypeInfo* type;
1236  const char* name;
1237  size_t offset;
1238 } __Pyx_StructField;
1239 typedef struct {
1240  __Pyx_StructField* field;
1241  size_t parent_offset;
1242 } __Pyx_BufFmt_StackElem;
1243 typedef struct {
1244  __Pyx_StructField root;
1245  __Pyx_BufFmt_StackElem* head;
1246  size_t fmt_offset;
1247  size_t new_count, enc_count;
1248  size_t struct_alignment;
1249  int is_complex;
1250  char enc_type;
1251  char new_packmode;
1252  char enc_packmode;
1253  char is_valid_array;
1254 } __Pyx_BufFmt_Context;
1255 
1256 
1257 /* "_definitions/types.pxd":97
1258  * ctypedef unsigned int[:] MemoryViewLongIndexType
1259  * ELSE:
1260  * ctypedef int LongIndexType # <<<<<<<<<<<<<<
1261  * ctypedef const int ConstLongIndexType
1262  * ctypedef int[:] MemoryViewLongIndexType
1263  */
1264 typedef int __pyx_t_5imate_12_definitions_5types_LongIndexType;
1265 
1266 /* "_definitions/types.pxd":98
1267  * ELSE:
1268  * ctypedef int LongIndexType
1269  * ctypedef const int ConstLongIndexType # <<<<<<<<<<<<<<
1270  * ctypedef int[:] MemoryViewLongIndexType
1271  *
1272  */
1273 typedef int const __pyx_t_5imate_12_definitions_5types_ConstLongIndexType;
1274 
1275 /* "_definitions/types.pxd":102
1276  *
1277  * # Used for indices of small matrices, or small size iterators
1278  * ctypedef int IndexType # <<<<<<<<<<<<<<
1279  * ctypedef const int ConstIndexType
1280  * ctypedef int[:] MemoryViewIndexType
1281  */
1282 typedef int __pyx_t_5imate_12_definitions_5types_IndexType;
1283 
1284 /* "_definitions/types.pxd":103
1285  * # Used for indices of small matrices, or small size iterators
1286  * ctypedef int IndexType
1287  * ctypedef const int ConstIndexType # <<<<<<<<<<<<<<
1288  * ctypedef int[:] MemoryViewIndexType
1289  *
1290  */
1291 typedef int const __pyx_t_5imate_12_definitions_5types_ConstIndexType;
1292 
1293 /* "_definitions/types.pxd":107
1294  *
1295  * # Used for both flags and integers used as signals, including negative integers
1296  * ctypedef int FlagType # <<<<<<<<<<<<<<
1297  * ctypedef const int ConstFlagType
1298  * ctypedef int[:] MemoryViewFlagType
1299  */
1300 typedef int __pyx_t_5imate_12_definitions_5types_FlagType;
1301 
1302 /* "_definitions/types.pxd":108
1303  * # Used for both flags and integers used as signals, including negative integers
1304  * ctypedef int FlagType
1305  * ctypedef const int ConstFlagType # <<<<<<<<<<<<<<
1306  * ctypedef int[:] MemoryViewFlagType
1307  *
1308  */
1309 typedef int const __pyx_t_5imate_12_definitions_5types_ConstFlagType;
1310 
1311 /*--- Type declarations ---*/
1312 struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
1313 struct __pyx_array_obj;
1314 struct __pyx_MemviewEnum_obj;
1315 struct __pyx_memoryview_obj;
1316 struct __pyx_memoryviewslice_obj;
1317 
1318 /* "_definitions/types.pxd":99
1319  * ctypedef int LongIndexType
1320  * ctypedef const int ConstLongIndexType
1321  * ctypedef int[:] MemoryViewLongIndexType # <<<<<<<<<<<<<<
1322  *
1323  * # Used for indices of small matrices, or small size iterators
1324  */
1325 typedef __Pyx_memviewslice __pyx_t_5imate_12_definitions_5types_MemoryViewLongIndexType;
1326 
1327 /* "_definitions/types.pxd":104
1328  * ctypedef int IndexType
1329  * ctypedef const int ConstIndexType
1330  * ctypedef int[:] MemoryViewIndexType # <<<<<<<<<<<<<<
1331  *
1332  * # Used for both flags and integers used as signals, including negative integers
1333  */
1334 typedef __Pyx_memviewslice __pyx_t_5imate_12_definitions_5types_MemoryViewIndexType;
1335 
1336 /* "_definitions/types.pxd":109
1337  * ctypedef int FlagType
1338  * ctypedef const int ConstFlagType
1339  * ctypedef int[:] MemoryViewFlagType # <<<<<<<<<<<<<<
1340  *
1341  *
1342  */
1343 typedef __Pyx_memviewslice __pyx_t_5imate_12_definitions_5types_MemoryViewFlagType;
1344 
1345 /* "_definitions/types.pxd":116
1346  * # ==============
1347  *
1348  * ctypedef double (*kernel_type)( # noqa: E211 # <<<<<<<<<<<<<<
1349  * const double x,
1350  * const double kernel_param) nogil
1351  */
1352 typedef double (*__pyx_t_5imate_12_definitions_5types_kernel_type)(double const , double const );
1353 
1354 /* "imate/_c_linear_operator/py_c_linear_operator.pxd":23
1355  * # ===================
1356  *
1357  * cdef class pycLinearOperator(object): # <<<<<<<<<<<<<<
1358  *
1359  * # Attributes
1360  */
1361 struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator {
1362  PyObject_HEAD
1363  struct __pyx_vtabstruct_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_vtab;
1364  cLinearOperator<float> *Aop_float;
1365  cLinearOperator<double> *Aop_double;
1366  cLinearOperator<long double> *Aop_long_double;
1367  char *data_type_name;
1368  char *long_index_type_name;
1369  __pyx_t_5imate_12_definitions_5types_IndexType num_parameters;
1370  PyObject *parameters;
1371 };
1372 
1373 
1374 /* "View.MemoryView":106
1375  *
1376  * @cname("__pyx_array")
1377  * cdef class array: # <<<<<<<<<<<<<<
1378  *
1379  * cdef:
1380  */
1381 struct __pyx_array_obj {
1382  PyObject_HEAD
1383  struct __pyx_vtabstruct_array *__pyx_vtab;
1384  char *data;
1385  Py_ssize_t len;
1386  char *format;
1387  int ndim;
1388  Py_ssize_t *_shape;
1389  Py_ssize_t *_strides;
1390  Py_ssize_t itemsize;
1391  PyObject *mode;
1392  PyObject *_format;
1393  void (*callback_free_data)(void *);
1394  int free_data;
1395  int dtype_is_object;
1396 };
1397 
1398 
1399 /* "View.MemoryView":280
1400  *
1401  * @cname('__pyx_MemviewEnum')
1402  * cdef class Enum(object): # <<<<<<<<<<<<<<
1403  * cdef object name
1404  * def __init__(self, name):
1405  */
1406 struct __pyx_MemviewEnum_obj {
1407  PyObject_HEAD
1408  PyObject *name;
1409 };
1410 
1411 
1412 /* "View.MemoryView":331
1413  *
1414  * @cname('__pyx_memoryview')
1415  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1416  *
1417  * cdef object obj
1418  */
1419 struct __pyx_memoryview_obj {
1420  PyObject_HEAD
1421  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1422  PyObject *obj;
1423  PyObject *_size;
1424  PyObject *_array_interface;
1425  PyThread_type_lock lock;
1426  __pyx_atomic_int acquisition_count[2];
1427  __pyx_atomic_int *acquisition_count_aligned_p;
1428  Py_buffer view;
1429  int flags;
1430  int dtype_is_object;
1431  __Pyx_TypeInfo *typeinfo;
1432 };
1433 
1434 
1435 /* "View.MemoryView":967
1436  *
1437  * @cname('__pyx_memoryviewslice')
1438  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1439  * "Internal class for passing memoryview slices to Python"
1440  *
1441  */
1442 struct __pyx_memoryviewslice_obj {
1443  struct __pyx_memoryview_obj __pyx_base;
1444  __Pyx_memviewslice from_slice;
1445  PyObject *from_object;
1446  PyObject *(*to_object_func)(char *);
1447  int (*to_dtype_func)(char *, PyObject *);
1448 };
1449 
1450 
1451 
1452 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":26
1453  * # ===================
1454  *
1455  * cdef class pycLinearOperator(object): # <<<<<<<<<<<<<<
1456  * """
1457  * """
1458  */
1459 
1460 struct __pyx_vtabstruct_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator {
1461  __pyx_t_5imate_12_definitions_5types_LongIndexType (*get_num_rows)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *);
1462  __pyx_t_5imate_12_definitions_5types_LongIndexType (*get_num_columns)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *);
1463  cLinearOperator<float> *(*get_linear_operator_float)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *);
1464  cLinearOperator<double> *(*get_linear_operator_double)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *);
1465  cLinearOperator<long double> *(*get_linear_operator_long_double)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *);
1466  void (*dot)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *, PyObject *, PyObject *, int __pyx_skip_dispatch);
1467  void (*transpose_dot)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *, PyObject *, PyObject *, int __pyx_skip_dispatch);
1468 };
1469 static struct __pyx_vtabstruct_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_vtabptr_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
1470 
1471 
1472 /* "View.MemoryView":106
1473  *
1474  * @cname("__pyx_array")
1475  * cdef class array: # <<<<<<<<<<<<<<
1476  *
1477  * cdef:
1478  */
1479 
1480 struct __pyx_vtabstruct_array {
1481  PyObject *(*get_memview)(struct __pyx_array_obj *);
1482 };
1483 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1484 
1485 
1486 /* "View.MemoryView":331
1487  *
1488  * @cname('__pyx_memoryview')
1489  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1490  *
1491  * cdef object obj
1492  */
1493 
1494 struct __pyx_vtabstruct_memoryview {
1495  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
1496  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
1497  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1498  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
1499  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1500  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
1501  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
1502 };
1503 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1504 
1505 
1506 /* "View.MemoryView":967
1507  *
1508  * @cname('__pyx_memoryviewslice')
1509  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1510  * "Internal class for passing memoryview slices to Python"
1511  *
1512  */
1513 
1514 struct __pyx_vtabstruct__memoryviewslice {
1515  struct __pyx_vtabstruct_memoryview __pyx_base;
1516 };
1517 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1518 
1519 /* --- Runtime support code (head) --- */
1520 /* Refnanny.proto */
1521 #ifndef CYTHON_REFNANNY
1522  #define CYTHON_REFNANNY 0
1523 #endif
1524 #if CYTHON_REFNANNY
1525  typedef struct {
1526  void (*INCREF)(void*, PyObject*, int);
1527  void (*DECREF)(void*, PyObject*, int);
1528  void (*GOTREF)(void*, PyObject*, int);
1529  void (*GIVEREF)(void*, PyObject*, int);
1530  void* (*SetupContext)(const char*, int, const char*);
1531  void (*FinishContext)(void**);
1532  } __Pyx_RefNannyAPIStruct;
1533  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1534  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1535  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1536 #ifdef WITH_THREAD
1537  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1538  if (acquire_gil) {\
1539  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1540  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1541  PyGILState_Release(__pyx_gilstate_save);\
1542  } else {\
1543  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1544  }
1545 #else
1546  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1547  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1548 #endif
1549  #define __Pyx_RefNannyFinishContext()\
1550  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1551  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1552  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1553  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1554  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1555  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1556  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1557  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1558  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1559 #else
1560  #define __Pyx_RefNannyDeclarations
1561  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1562  #define __Pyx_RefNannyFinishContext()
1563  #define __Pyx_INCREF(r) Py_INCREF(r)
1564  #define __Pyx_DECREF(r) Py_DECREF(r)
1565  #define __Pyx_GOTREF(r)
1566  #define __Pyx_GIVEREF(r)
1567  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1568  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1569  #define __Pyx_XGOTREF(r)
1570  #define __Pyx_XGIVEREF(r)
1571 #endif
1572 #define __Pyx_XDECREF_SET(r, v) do {\
1573  PyObject *tmp = (PyObject *) r;\
1574  r = v; __Pyx_XDECREF(tmp);\
1575  } while (0)
1576 #define __Pyx_DECREF_SET(r, v) do {\
1577  PyObject *tmp = (PyObject *) r;\
1578  r = v; __Pyx_DECREF(tmp);\
1579  } while (0)
1580 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1581 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1582 
1583 /* PyObjectGetAttrStr.proto */
1584 #if CYTHON_USE_TYPE_SLOTS
1585 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1586 #else
1587 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1588 #endif
1589 
1590 /* GetBuiltinName.proto */
1591 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1592 
1593 /* RaiseArgTupleInvalid.proto */
1594 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1595  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1596 
1597 /* KeywordStringCheck.proto */
1598 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1599 
1600 /* PyThreadStateGet.proto */
1601 #if CYTHON_FAST_THREAD_STATE
1602 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1603 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1604 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1605 #else
1606 #define __Pyx_PyThreadState_declare
1607 #define __Pyx_PyThreadState_assign
1608 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1609 #endif
1610 
1611 /* PyErrFetchRestore.proto */
1612 #if CYTHON_FAST_THREAD_STATE
1613 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1614 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1615 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1616 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1617 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1618 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1619 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1620 #if CYTHON_COMPILING_IN_CPYTHON
1621 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1622 #else
1623 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1624 #endif
1625 #else
1626 #define __Pyx_PyErr_Clear() PyErr_Clear()
1627 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1628 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1629 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1630 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1631 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1632 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1633 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1634 #endif
1635 
1636 /* Profile.proto */
1637 #ifndef CYTHON_PROFILE
1638 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
1639  #define CYTHON_PROFILE 0
1640 #else
1641  #define CYTHON_PROFILE 1
1642 #endif
1643 #endif
1644 #ifndef CYTHON_TRACE_NOGIL
1645  #define CYTHON_TRACE_NOGIL 0
1646 #else
1647  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
1648  #define CYTHON_TRACE 1
1649  #endif
1650 #endif
1651 #ifndef CYTHON_TRACE
1652  #define CYTHON_TRACE 0
1653 #endif
1654 #if CYTHON_TRACE
1655  #undef CYTHON_PROFILE_REUSE_FRAME
1656 #endif
1657 #ifndef CYTHON_PROFILE_REUSE_FRAME
1658  #define CYTHON_PROFILE_REUSE_FRAME 0
1659 #endif
1660 #if CYTHON_PROFILE || CYTHON_TRACE
1661  #include "compile.h"
1662  #include "frameobject.h"
1663  #include "traceback.h"
1664 #if PY_VERSION_HEX >= 0x030b00a6
1665  #ifndef Py_BUILD_CORE
1666  #define Py_BUILD_CORE 1
1667  #endif
1668  #include "internal/pycore_frame.h"
1669 #endif
1670  #if CYTHON_PROFILE_REUSE_FRAME
1671  #define CYTHON_FRAME_MODIFIER static
1672  #define CYTHON_FRAME_DEL(frame)
1673  #else
1674  #define CYTHON_FRAME_MODIFIER
1675  #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
1676  #endif
1677  #define __Pyx_TraceDeclarations\
1678  static PyCodeObject *__pyx_frame_code = NULL;\
1679  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
1680  int __Pyx_use_tracing = 0;
1681  #define __Pyx_TraceFrameInit(codeobj)\
1682  if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
1683 #if PY_VERSION_HEX >= 0x030b00a2
1684  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1685  (unlikely((tstate)->cframe->use_tracing) &&\
1686  (!(check_tracing) || !(tstate)->tracing) &&\
1687  (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1688  #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
1689  #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
1690 #elif PY_VERSION_HEX >= 0x030a00b1
1691  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1692  (unlikely((tstate)->cframe->use_tracing) &&\
1693  (!(check_tracing) || !(tstate)->tracing) &&\
1694  (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1695  #define __Pyx_EnterTracing(tstate)\
1696  do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
1697  #define __Pyx_LeaveTracing(tstate)\
1698  do {\
1699  tstate->tracing--;\
1700  tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
1701  || tstate->c_profilefunc != NULL);\
1702  } while (0)
1703 #else
1704  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1705  (unlikely((tstate)->use_tracing) &&\
1706  (!(check_tracing) || !(tstate)->tracing) &&\
1707  (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1708  #define __Pyx_EnterTracing(tstate)\
1709  do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
1710  #define __Pyx_LeaveTracing(tstate)\
1711  do {\
1712  tstate->tracing--;\
1713  tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
1714  || tstate->c_profilefunc != NULL);\
1715  } while (0)
1716 #endif
1717  #ifdef WITH_THREAD
1718  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
1719  if (nogil) {\
1720  if (CYTHON_TRACE_NOGIL) {\
1721  PyThreadState *tstate;\
1722  PyGILState_STATE state = PyGILState_Ensure();\
1723  tstate = __Pyx_PyThreadState_Current;\
1724  if (__Pyx_IsTracing(tstate, 1, 1)) {\
1725  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
1726  }\
1727  PyGILState_Release(state);\
1728  if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1729  }\
1730  } else {\
1731  PyThreadState* tstate = PyThreadState_GET();\
1732  if (__Pyx_IsTracing(tstate, 1, 1)) {\
1733  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
1734  if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1735  }\
1736  }
1737  #else
1738  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
1739  { PyThreadState* tstate = PyThreadState_GET();\
1740  if (__Pyx_IsTracing(tstate, 1, 1)) {\
1741  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
1742  if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1743  }\
1744  }
1745  #endif
1746  #define __Pyx_TraceException()\
1747  if (likely(!__Pyx_use_tracing)); else {\
1748  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1749  if (__Pyx_IsTracing(tstate, 0, 1)) {\
1750  __Pyx_EnterTracing(tstate);\
1751  PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
1752  if (exc_info) {\
1753  if (CYTHON_TRACE && tstate->c_tracefunc)\
1754  tstate->c_tracefunc(\
1755  tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
1756  tstate->c_profilefunc(\
1757  tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
1758  Py_DECREF(exc_info);\
1759  }\
1760  __Pyx_LeaveTracing(tstate);\
1761  }\
1762  }
1763  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
1764  PyObject *type, *value, *traceback;
1765  __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
1766  __Pyx_EnterTracing(tstate);
1767  if (CYTHON_TRACE && tstate->c_tracefunc)
1768  tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
1769  if (tstate->c_profilefunc)
1770  tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
1771  CYTHON_FRAME_DEL(frame);
1772  __Pyx_LeaveTracing(tstate);
1773  __Pyx_ErrRestoreInState(tstate, type, value, traceback);
1774  }
1775  #ifdef WITH_THREAD
1776  #define __Pyx_TraceReturn(result, nogil)\
1777  if (likely(!__Pyx_use_tracing)); else {\
1778  if (nogil) {\
1779  if (CYTHON_TRACE_NOGIL) {\
1780  PyThreadState *tstate;\
1781  PyGILState_STATE state = PyGILState_Ensure();\
1782  tstate = __Pyx_PyThreadState_Current;\
1783  if (__Pyx_IsTracing(tstate, 0, 0)) {\
1784  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
1785  }\
1786  PyGILState_Release(state);\
1787  }\
1788  } else {\
1789  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1790  if (__Pyx_IsTracing(tstate, 0, 0)) {\
1791  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
1792  }\
1793  }\
1794  }
1795  #else
1796  #define __Pyx_TraceReturn(result, nogil)\
1797  if (likely(!__Pyx_use_tracing)); else {\
1798  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1799  if (__Pyx_IsTracing(tstate, 0, 0)) {\
1800  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
1801  }\
1802  }
1803  #endif
1804  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
1805  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
1806 #else
1807  #define __Pyx_TraceDeclarations
1808  #define __Pyx_TraceFrameInit(codeobj)
1809  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error;
1810  #define __Pyx_TraceException()
1811  #define __Pyx_TraceReturn(result, nogil)
1812 #endif
1813 #if CYTHON_TRACE
1814  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
1815  int ret;
1816  PyObject *type, *value, *traceback;
1817  __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
1818  __Pyx_PyFrame_SetLineNumber(frame, lineno);
1819  __Pyx_EnterTracing(tstate);
1820  ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
1821  __Pyx_LeaveTracing(tstate);
1822  if (likely(!ret)) {
1823  __Pyx_ErrRestoreInState(tstate, type, value, traceback);
1824  } else {
1825  Py_XDECREF(type);
1826  Py_XDECREF(value);
1827  Py_XDECREF(traceback);
1828  }
1829  return ret;
1830  }
1831  #ifdef WITH_THREAD
1832  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
1833  if (likely(!__Pyx_use_tracing)); else {\
1834  if (nogil) {\
1835  if (CYTHON_TRACE_NOGIL) {\
1836  int ret = 0;\
1837  PyThreadState *tstate;\
1838  PyGILState_STATE state = PyGILState_Ensure();\
1839  tstate = __Pyx_PyThreadState_Current;\
1840  if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
1841  ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
1842  }\
1843  PyGILState_Release(state);\
1844  if (unlikely(ret)) goto_error;\
1845  }\
1846  } else {\
1847  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1848  if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
1849  int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
1850  if (unlikely(ret)) goto_error;\
1851  }\
1852  }\
1853  }
1854  #else
1855  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
1856  if (likely(!__Pyx_use_tracing)); else {\
1857  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
1858  if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
1859  int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
1860  if (unlikely(ret)) goto_error;\
1861  }\
1862  }
1863  #endif
1864 #else
1865  #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error;
1866 #endif
1867 
1868 /* PyObjectCall.proto */
1869 #if CYTHON_COMPILING_IN_CPYTHON
1870 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1871 #else
1872 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1873 #endif
1874 
1875 /* RaiseException.proto */
1876 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1877 
1878 /* WriteUnraisableException.proto */
1879 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1880  int lineno, const char *filename,
1881  int full_traceback, int nogil);
1882 
1883 /* IncludeStringH.proto */
1884 #include <string.h>
1885 
1886 /* BytesEquals.proto */
1887 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1888 
1889 /* PyCFunctionFastCall.proto */
1890 #if CYTHON_FAST_PYCCALL
1891 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1892 #else
1893 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1894 #endif
1895 
1896 /* PyFunctionFastCall.proto */
1897 #if CYTHON_FAST_PYCALL
1898 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1899  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1900 #if 1 || PY_VERSION_HEX < 0x030600B1
1901 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1902 #else
1903 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1904 #endif
1905 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1906  (sizeof(char [1 - 2*!(cond)]) - 1)
1907 #ifndef Py_MEMBER_SIZE
1908 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1909 #endif
1910 #if CYTHON_FAST_PYCALL
1911  static size_t __pyx_pyframe_localsplus_offset = 0;
1912  #include "frameobject.h"
1913 #if PY_VERSION_HEX >= 0x030b00a6
1914  #ifndef Py_BUILD_CORE
1915  #define Py_BUILD_CORE 1
1916  #endif
1917  #include "internal/pycore_frame.h"
1918 #endif
1919  #define __Pxy_PyFrame_Initialize_Offsets()\
1920  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1921  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1922  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1923  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1924 #endif // CYTHON_FAST_PYCALL
1925 #endif
1926 
1927 /* PyObjectCallMethO.proto */
1928 #if CYTHON_COMPILING_IN_CPYTHON
1929 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1930 #endif
1931 
1932 /* PyObjectCallOneArg.proto */
1933 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1934 
1935 /* PyDictVersioning.proto */
1936 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1937 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1938 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1939 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1940  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1941  (cache_var) = (value);
1942 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1943  static PY_UINT64_T __pyx_dict_version = 0;\
1944  static PyObject *__pyx_dict_cached_value = NULL;\
1945  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1946  (VAR) = __pyx_dict_cached_value;\
1947  } else {\
1948  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1949  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1950  }\
1951 }
1952 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1953 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1954 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1955 #else
1956 #define __PYX_GET_DICT_VERSION(dict) (0)
1957 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1958 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1959 #endif
1960 
1961 /* GetModuleGlobalName.proto */
1962 #if CYTHON_USE_DICT_VERSIONS
1963 #define __Pyx_GetModuleGlobalName(var, name) do {\
1964  static PY_UINT64_T __pyx_dict_version = 0;\
1965  static PyObject *__pyx_dict_cached_value = NULL;\
1966  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1967  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1968  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1969 } while(0)
1970 #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
1971  PY_UINT64_T __pyx_dict_version;\
1972  PyObject *__pyx_dict_cached_value;\
1973  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1974 } while(0)
1975 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1976 #else
1977 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1978 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1979 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1980 #endif
1981 
1982 /* PyObjectCall2Args.proto */
1983 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1984 
1985 /* UnicodeEquals.proto */
1986 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1987 
1988 /* MemviewSliceInit.proto */
1989 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
1990 #define __Pyx_MEMVIEW_DIRECT 1
1991 #define __Pyx_MEMVIEW_PTR 2
1992 #define __Pyx_MEMVIEW_FULL 4
1993 #define __Pyx_MEMVIEW_CONTIG 8
1994 #define __Pyx_MEMVIEW_STRIDED 16
1995 #define __Pyx_MEMVIEW_FOLLOW 32
1996 #define __Pyx_IS_C_CONTIG 1
1997 #define __Pyx_IS_F_CONTIG 2
1998 static int __Pyx_init_memviewslice(
1999  struct __pyx_memoryview_obj *memview,
2000  int ndim,
2001  __Pyx_memviewslice *memviewslice,
2002  int memview_is_new_reference);
2003 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
2004  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2005 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
2006  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2007 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
2008 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
2009 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
2010 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
2011 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
2012 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
2013 
2014 /* RaiseDoubleKeywords.proto */
2015 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
2016 
2017 /* ParseKeywords.proto */
2018 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
2019  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
2020  const char* function_name);
2021 
2022 /* ArgTypeTest.proto */
2023 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
2024  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
2025  __Pyx__ArgTypeTest(obj, type, name, exact))
2026 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
2027 
2028 /* StrEquals.proto */
2029 #if PY_MAJOR_VERSION >= 3
2030 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
2031 #else
2032 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
2033 #endif
2034 
2035 /* UnaryNegOverflows.proto */
2036 #define UNARY_NEG_WOULD_OVERFLOW(x)\
2037  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2038 
2039 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2040 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
2041 /* GetAttr.proto */
2042 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2043 
2044 /* GetItemInt.proto */
2045 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2046  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2047  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
2048  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
2049  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
2050 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2051  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2052  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2053  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2054 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2055  int wraparound, int boundscheck);
2056 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2057  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2058  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2059  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
2060 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
2061  int wraparound, int boundscheck);
2062 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
2063 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
2064  int is_list, int wraparound, int boundscheck);
2065 
2066 /* ObjectGetItem.proto */
2067 #if CYTHON_USE_TYPE_SLOTS
2068 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
2069 #else
2070 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
2071 #endif
2072 
2073 /* decode_c_string_utf16.proto */
2074 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
2075  int byteorder = 0;
2076  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2077 }
2078 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
2079  int byteorder = -1;
2080  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2081 }
2082 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
2083  int byteorder = 1;
2084  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2085 }
2086 
2087 /* decode_c_string.proto */
2088 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
2089  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
2090  const char* encoding, const char* errors,
2091  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
2092 
2093 /* PyErrExceptionMatches.proto */
2094 #if CYTHON_FAST_THREAD_STATE
2095 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2096 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2097 #else
2098 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2099 #endif
2100 
2101 /* GetAttr3.proto */
2102 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2103 
2104 /* RaiseTooManyValuesToUnpack.proto */
2105 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2106 
2107 /* RaiseNeedMoreValuesToUnpack.proto */
2108 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2109 
2110 /* RaiseNoneIterError.proto */
2111 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
2112 
2113 /* ExtTypeTest.proto */
2114 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2115 
2116 /* GetTopmostException.proto */
2117 #if CYTHON_USE_EXC_INFO_STACK
2118 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2119 #endif
2120 
2121 /* SaveResetException.proto */
2122 #if CYTHON_FAST_THREAD_STATE
2123 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2124 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2125 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2126 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2127 #else
2128 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2129 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2130 #endif
2131 
2132 /* GetException.proto */
2133 #if CYTHON_FAST_THREAD_STATE
2134 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2135 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2136 #else
2137 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2138 #endif
2139 
2140 /* SwapException.proto */
2141 #if CYTHON_FAST_THREAD_STATE
2142 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
2143 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2144 #else
2145 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2146 #endif
2147 
2148 /* Import.proto */
2149 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
2150 
2151 /* FastTypeChecks.proto */
2152 #if CYTHON_COMPILING_IN_CPYTHON
2153 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2154 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2155 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2156 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2157 #else
2158 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2159 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2160 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2161 #endif
2162 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2163 
2164 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2165 /* ListCompAppend.proto */
2166 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2167 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
2168  PyListObject* L = (PyListObject*) list;
2169  Py_ssize_t len = Py_SIZE(list);
2170  if (likely(L->allocated > len)) {
2171  Py_INCREF(x);
2172  PyList_SET_ITEM(list, len, x);
2173  __Pyx_SET_SIZE(list, len + 1);
2174  return 0;
2175  }
2176  return PyList_Append(list, x);
2177 }
2178 #else
2179 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
2180 #endif
2181 
2182 /* PyIntBinop.proto */
2183 #if !CYTHON_COMPILING_IN_PYPY
2184 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
2185 #else
2186 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
2187  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2188 #endif
2189 
2190 /* ListExtend.proto */
2191 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
2192 #if CYTHON_COMPILING_IN_CPYTHON
2193  PyObject* none = _PyList_Extend((PyListObject*)L, v);
2194  if (unlikely(!none))
2195  return -1;
2196  Py_DECREF(none);
2197  return 0;
2198 #else
2199  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
2200 #endif
2201 }
2202 
2203 /* ListAppend.proto */
2204 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2205 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
2206  PyListObject* L = (PyListObject*) list;
2207  Py_ssize_t len = Py_SIZE(list);
2208  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
2209  Py_INCREF(x);
2210  PyList_SET_ITEM(list, len, x);
2211  __Pyx_SET_SIZE(list, len + 1);
2212  return 0;
2213  }
2214  return PyList_Append(list, x);
2215 }
2216 #else
2217 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2218 #endif
2219 
2220 /* AssertionsEnabled.proto */
2221 #define __Pyx_init_assertions_enabled()
2222 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
2223  #define __pyx_assertions_enabled() (1)
2224 #elif PY_VERSION_HEX < 0x03080000 || CYTHON_COMPILING_IN_PYPY || defined(Py_LIMITED_API)
2225  #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
2226 #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030900A6
2227  static int __pyx_assertions_enabled_flag;
2228  #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
2229  #undef __Pyx_init_assertions_enabled
2230  static void __Pyx_init_assertions_enabled(void) {
2231  __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
2232  }
2233 #else
2234  #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
2235 #endif
2236 
2237 /* None.proto */
2238 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
2239 
2240 /* PySequenceContains.proto */
2241 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
2242  int result = PySequence_Contains(seq, item);
2243  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
2244 }
2245 
2246 /* ImportFrom.proto */
2247 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
2248 
2249 /* HasAttr.proto */
2250 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2251 
2252 /* PyObject_GenericGetAttrNoDict.proto */
2253 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2254 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
2255 #else
2256 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2257 #endif
2258 
2259 /* PyObject_GenericGetAttr.proto */
2260 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2261 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
2262 #else
2263 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2264 #endif
2265 
2266 /* SetVTable.proto */
2267 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
2268 
2269 /* PyObjectGetAttrStrNoError.proto */
2270 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2271 
2272 /* SetupReduce.proto */
2273 static int __Pyx_setup_reduce(PyObject* type_obj);
2274 
2275 /* FetchCommonType.proto */
2276 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
2277 
2278 /* CythonFunctionShared.proto */
2279 #define __Pyx_CyFunction_USED 1
2280 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2281 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2282 #define __Pyx_CYFUNCTION_CCLASS 0x04
2283 #define __Pyx_CyFunction_GetClosure(f)\
2284  (((__pyx_CyFunctionObject *) (f))->func_closure)
2285 #define __Pyx_CyFunction_GetClassObj(f)\
2286  (((__pyx_CyFunctionObject *) (f))->func_classobj)
2287 #define __Pyx_CyFunction_Defaults(type, f)\
2288  ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
2289 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2290  ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
2291 typedef struct {
2292  PyCFunctionObject func;
2293 #if PY_VERSION_HEX < 0x030500A0
2294  PyObject *func_weakreflist;
2295 #endif
2296  PyObject *func_dict;
2297  PyObject *func_name;
2298  PyObject *func_qualname;
2299  PyObject *func_doc;
2300  PyObject *func_globals;
2301  PyObject *func_code;
2302  PyObject *func_closure;
2303  PyObject *func_classobj;
2304  void *defaults;
2305  int defaults_pyobjects;
2306  size_t defaults_size; // used by FusedFunction for copying defaults
2307  int flags;
2308  PyObject *defaults_tuple;
2309  PyObject *defaults_kwdict;
2310  PyObject *(*defaults_getter)(PyObject *);
2311  PyObject *func_annotations;
2312 } __pyx_CyFunctionObject;
2313 static PyTypeObject *__pyx_CyFunctionType = 0;
2314 #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
2315 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
2316  int flags, PyObject* qualname,
2317  PyObject *self,
2318  PyObject *module, PyObject *globals,
2319  PyObject* code);
2320 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
2321  size_t size,
2322  int pyobjects);
2323 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2324  PyObject *tuple);
2325 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2326  PyObject *dict);
2327 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2328  PyObject *dict);
2329 static int __pyx_CyFunction_init(void);
2330 
2331 /* CythonFunction.proto */
2332 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2333  int flags, PyObject* qualname,
2334  PyObject *closure,
2335  PyObject *module, PyObject *globals,
2336  PyObject* code);
2337 
2338 /* CLineInTraceback.proto */
2339 #ifdef CYTHON_CLINE_IN_TRACEBACK
2340 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2341 #else
2342 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2343 #endif
2344 
2345 /* CodeObjectCache.proto */
2346 typedef struct {
2347  PyCodeObject* code_object;
2348  int code_line;
2349 } __Pyx_CodeObjectCacheEntry;
2350 struct __Pyx_CodeObjectCache {
2351  int count;
2352  int max_count;
2353  __Pyx_CodeObjectCacheEntry* entries;
2354 };
2355 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2356 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2357 static PyCodeObject *__pyx_find_code_object(int code_line);
2358 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
2359 
2360 /* AddTraceback.proto */
2361 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2362  int py_line, const char *filename);
2363 
2364 #if PY_MAJOR_VERSION < 3
2365  static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
2366  static void __Pyx_ReleaseBuffer(Py_buffer *view);
2367 #else
2368  #define __Pyx_GetBuffer PyObject_GetBuffer
2369  #define __Pyx_ReleaseBuffer PyBuffer_Release
2370 #endif
2371 
2372 
2373 /* BufferStructDeclare.proto */
2374 typedef struct {
2375  Py_ssize_t shape, strides, suboffsets;
2376 } __Pyx_Buf_DimInfo;
2377 typedef struct {
2378  size_t refcount;
2379  Py_buffer pybuffer;
2380 } __Pyx_Buffer;
2381 typedef struct {
2382  __Pyx_Buffer *rcbuffer;
2383  char *data;
2384  __Pyx_Buf_DimInfo diminfo[8];
2385 } __Pyx_LocalBuf_ND;
2386 
2387 /* MemviewSliceIsContig.proto */
2388 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2389 
2390 /* OverlappingSlices.proto */
2391 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2392  __Pyx_memviewslice *slice2,
2393  int ndim, size_t itemsize);
2394 
2395 /* Capsule.proto */
2396 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2397 
2398 /* GCCDiagnostics.proto */
2399 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2400 #define __Pyx_HAS_GCC_DIAGNOSTIC
2401 #endif
2402 
2403 /* IsLittleEndian.proto */
2404 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
2405 
2406 /* BufferFormatCheck.proto */
2407 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
2408 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
2409  __Pyx_BufFmt_StackElem* stack,
2410  __Pyx_TypeInfo* type);
2411 
2412 /* TypeInfoCompare.proto */
2413 static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
2414 
2415 /* MemviewSliceValidateAndInit.proto */
2416 static int __Pyx_ValidateAndInit_memviewslice(
2417  int *axes_specs,
2418  int c_or_f_flag,
2419  int buf_flags,
2420  int ndim,
2421  __Pyx_TypeInfo *dtype,
2422  __Pyx_BufFmt_StackElem stack[],
2423  __Pyx_memviewslice *memviewslice,
2424  PyObject *original_obj);
2425 
2426 /* ObjectToMemviewSlice.proto */
2427 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_float(PyObject *, int writable_flag);
2428 
2429 /* ObjectToMemviewSlice.proto */
2430 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *, int writable_flag);
2431 
2432 /* ObjectToMemviewSlice.proto */
2433 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(PyObject *, int writable_flag);
2434 
2435 /* MemviewSliceCopyTemplate.proto */
2436 static __Pyx_memviewslice
2437 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
2438  const char *mode, int ndim,
2439  size_t sizeof_dtype, int contig_flag,
2440  int dtype_is_object);
2441 
2442 /* CIntToPy.proto */
2443 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2444 
2445 /* CIntFromPy.proto */
2446 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2447 
2448 /* CIntFromPy.proto */
2449 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2450 
2451 /* CIntToPy.proto */
2452 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2453 
2454 /* CIntFromPy.proto */
2455 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2456 
2457 /* CheckBinaryVersion.proto */
2458 static int __Pyx_check_binary_version(void);
2459 
2460 /* InitStrings.proto */
2461 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2462 
2463 static __pyx_t_5imate_12_definitions_5types_LongIndexType __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_rows(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto*/
2464 static __pyx_t_5imate_12_definitions_5types_LongIndexType __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_columns(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto*/
2465 static cLinearOperator<float> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_float(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto*/
2466 static cLinearOperator<double> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_double(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto*/
2467 static cLinearOperator<long double> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_long_double(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto*/
2468 static void __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product, int __pyx_skip_dispatch); /* proto*/
2469 static void __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_transpose_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product, int __pyx_skip_dispatch); /* proto*/
2470 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2471 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2472 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2473 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
2474 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
2475 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2476 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2477 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2478 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2479 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2480 
2481 /* Module declarations from 'imate._definitions.types' */
2482 
2483 /* Module declarations from 'imate._c_linear_operator.c_linear_operator' */
2484 
2485 /* Module declarations from 'libc.string' */
2486 
2487 /* Module declarations from 'libc.stdlib' */
2488 
2489 /* Module declarations from 'imate._c_linear_operator.py_c_linear_operator' */
2490 static PyTypeObject *__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator = 0;
2491 static PyTypeObject *__pyx_array_type = 0;
2492 static PyTypeObject *__pyx_MemviewEnum_type = 0;
2493 static PyTypeObject *__pyx_memoryview_type = 0;
2494 static PyTypeObject *__pyx_memoryviewslice_type = 0;
2495 static PyObject *generic = 0;
2496 static PyObject *strided = 0;
2497 static PyObject *indirect = 0;
2498 static PyObject *contiguous = 0;
2499 static PyObject *indirect_contiguous = 0;
2500 static int __pyx_memoryview_thread_locks_used;
2501 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
2502 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2503 static void *__pyx_align_pointer(void *, size_t); /*proto*/
2504 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
2505 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
2506 static PyObject *_unellipsify(PyObject *, int); /*proto*/
2507 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
2508 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
2509 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
2510 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
2511 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
2512 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
2513 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2514 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2515 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
2516 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2517 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
2518 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
2519 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
2520 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
2521 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
2522 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
2523 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
2524 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
2525 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
2526 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
2527 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
2528 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
2529 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
2530 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2531 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2532 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
2533 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
2534 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
2535 static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };
2536 static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
2537 static __Pyx_TypeInfo __Pyx_TypeInfo_long__double = { "long double", NULL, sizeof(long double), { 0 }, 0, 'R', 0, 0 };
2538 #define __Pyx_MODULE_NAME "imate._c_linear_operator.py_c_linear_operator"
2539 extern int __pyx_module_is_main_imate___c_linear_operator__py_c_linear_operator;
2540 int __pyx_module_is_main_imate___c_linear_operator__py_c_linear_operator = 0;
2541 
2542 /* Implementation of 'imate._c_linear_operator.py_c_linear_operator' */
2543 static PyObject *__pyx_builtin_TypeError;
2544 static PyObject *__pyx_builtin_ValueError;
2545 static PyObject *__pyx_builtin_RuntimeError;
2546 static PyObject *__pyx_builtin_MemoryError;
2547 static PyObject *__pyx_builtin_enumerate;
2548 static PyObject *__pyx_builtin_range;
2549 static PyObject *__pyx_builtin_Ellipsis;
2550 static PyObject *__pyx_builtin_id;
2551 static PyObject *__pyx_builtin_IndexError;
2552 static const char __pyx_k_O[] = "O";
2553 static const char __pyx_k_c[] = "c";
2554 static const char __pyx_k_id[] = "id";
2555 static const char __pyx_k_dot[] = "dot";
2556 static const char __pyx_k_new[] = "__new__";
2557 static const char __pyx_k_obj[] = "obj";
2558 static const char __pyx_k_base[] = "base";
2559 static const char __pyx_k_dict[] = "__dict__";
2560 static const char __pyx_k_main[] = "__main__";
2561 static const char __pyx_k_mode[] = "mode";
2562 static const char __pyx_k_name[] = "name";
2563 static const char __pyx_k_ndim[] = "ndim";
2564 static const char __pyx_k_pack[] = "pack";
2565 static const char __pyx_k_self[] = "self";
2566 static const char __pyx_k_size[] = "size";
2567 static const char __pyx_k_step[] = "step";
2568 static const char __pyx_k_stop[] = "stop";
2569 static const char __pyx_k_test[] = "__test__";
2570 static const char __pyx_k_ASCII[] = "ASCII";
2571 static const char __pyx_k_array[] = "array";
2572 static const char __pyx_k_class[] = "__class__";
2573 static const char __pyx_k_dtype[] = "dtype";
2574 static const char __pyx_k_error[] = "error";
2575 static const char __pyx_k_flags[] = "flags";
2576 static const char __pyx_k_numpy[] = "numpy";
2577 static const char __pyx_k_range[] = "range";
2578 static const char __pyx_k_shape[] = "shape";
2579 static const char __pyx_k_start[] = "start";
2580 static const char __pyx_k_astype[] = "astype";
2581 static const char __pyx_k_encode[] = "encode";
2582 static const char __pyx_k_format[] = "format";
2583 static const char __pyx_k_import[] = "__import__";
2584 static const char __pyx_k_name_2[] = "__name__";
2585 static const char __pyx_k_pickle[] = "pickle";
2586 static const char __pyx_k_reduce[] = "__reduce__";
2587 static const char __pyx_k_struct[] = "struct";
2588 static const char __pyx_k_unpack[] = "unpack";
2589 static const char __pyx_k_update[] = "update";
2590 static const char __pyx_k_vector[] = "vector";
2591 static const char __pyx_k_float32[] = "float32";
2592 static const char __pyx_k_float64[] = "float64";
2593 static const char __pyx_k_fortran[] = "fortran";
2594 static const char __pyx_k_memview[] = "memview";
2595 static const char __pyx_k_product[] = "product";
2596 static const char __pyx_k_Ellipsis[] = "Ellipsis";
2597 static const char __pyx_k_float128[] = "float128";
2598 static const char __pyx_k_getstate[] = "__getstate__";
2599 static const char __pyx_k_isscalar[] = "isscalar";
2600 static const char __pyx_k_itemsize[] = "itemsize";
2601 static const char __pyx_k_pyx_type[] = "__pyx_type";
2602 static const char __pyx_k_setstate[] = "__setstate__";
2603 static const char __pyx_k_TypeError[] = "TypeError";
2604 static const char __pyx_k_enumerate[] = "enumerate";
2605 static const char __pyx_k_pyx_state[] = "__pyx_state";
2606 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2607 static const char __pyx_k_IndexError[] = "IndexError";
2608 static const char __pyx_k_ValueError[] = "ValueError";
2609 static const char __pyx_k_parameters[] = "parameters_";
2610 static const char __pyx_k_pyx_result[] = "__pyx_result";
2611 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2612 static const char __pyx_k_MemoryError[] = "MemoryError";
2613 static const char __pyx_k_PickleError[] = "PickleError";
2614 static const char __pyx_k_RuntimeError[] = "RuntimeError";
2615 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
2616 static const char __pyx_k_stringsource[] = "stringsource";
2617 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
2618 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2619 static const char __pyx_k_transpose_dot[] = "transpose_dot";
2620 static const char __pyx_k_set_parameters[] = "set_parameters";
2621 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
2622 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
2623 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
2624 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
2625 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2626 static const char __pyx_k_pycLinearOperator[] = "pycLinearOperator";
2627 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
2628 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2629 static const char __pyx_k_get_data_type_name[] = "get_data_type_name";
2630 static const char __pyx_k_get_num_parameters[] = "get_num_parameters";
2631 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
2632 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
2633 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
2634 static const char __pyx_k_pycLinearOperator_dot[] = "pycLinearOperator.dot";
2635 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
2636 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
2637 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
2638 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
2639 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
2640 static const char __pyx_k_LinearOperator_object_is_s[] = "LinearOperator object is: %s";
2641 static const char __pyx_k_Linear_operator_is_not_set[] = "Linear operator is not set.";
2642 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
2643 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
2644 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
2645 static const char __pyx_k_LongIndexType_has_an_unconventi[] = "\"LongIndexType\" has an unconventional byte size.";
2646 static const char __pyx_k_pycLinearOperator_get_data_type[] = "pycLinearOperator.get_data_type_name";
2647 static const char __pyx_k_pycLinearOperator_transpose_dot[] = "pycLinearOperator.transpose_dot";
2648 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
2649 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
2650 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
2651 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
2652 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
2653 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
2654 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
2655 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
2656 static const char __pyx_k_Linear_operator_data_type_is_not[] = "Linear operator data type is not set.";
2657 static const char __pyx_k_Linear_operator_double_type_is_n[] = "Linear operator (double type) is not set.";
2658 static const char __pyx_k_Linear_operator_float_type_is_no[] = "Linear operator (float type) is not set.";
2659 static const char __pyx_k_Linear_operator_long_double_type[] = "Linear operator (long double type) is not set.";
2660 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
2661 static const char __pyx_k_The_input_vector_and_product_sho[] = "The input vector and product should have ";
2662 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
2663 static const char __pyx_k_Vector_type_should_be_either_flo[] = "Vector type should be either \"float32\", \"float64\", or \"float128\".";
2664 static const char __pyx_k_Wrong_accessors_is_called_The_ty[] = "Wrong accessors is called. The type of the ";
2665 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
2666 static const char __pyx_k_imate__c_linear_operator_py_c_li[] = "imate/_c_linear_operator/py_c_linear_operator.pyx";
2667 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2668 static const char __pyx_k_pycLinearOperator___reduce_cytho[] = "pycLinearOperator.__reduce_cython__";
2669 static const char __pyx_k_pycLinearOperator___setstate_cyt[] = "pycLinearOperator.__setstate_cython__";
2670 static const char __pyx_k_pycLinearOperator_get_num_parame[] = "pycLinearOperator.get_num_parameters";
2671 static const char __pyx_k_pycLinearOperator_set_parameters[] = "pycLinearOperator.set_parameters";
2672 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
2673 static const char __pyx_k_imate__c_linear_operator_py_c_li_2[] = "imate._c_linear_operator.py_c_linear_operator";
2674 static PyObject *__pyx_n_s_ASCII;
2675 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
2676 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
2677 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
2678 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
2679 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
2680 static PyObject *__pyx_n_s_Ellipsis;
2681 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
2682 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
2683 static PyObject *__pyx_n_s_IndexError;
2684 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
2685 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
2686 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
2687 static PyObject *__pyx_kp_u_LinearOperator_object_is_s;
2688 static PyObject *__pyx_kp_u_Linear_operator_data_type_is_not;
2689 static PyObject *__pyx_kp_u_Linear_operator_double_type_is_n;
2690 static PyObject *__pyx_kp_u_Linear_operator_float_type_is_no;
2691 static PyObject *__pyx_kp_u_Linear_operator_is_not_set;
2692 static PyObject *__pyx_kp_u_Linear_operator_long_double_type;
2693 static PyObject *__pyx_kp_u_LongIndexType_has_an_unconventi;
2694 static PyObject *__pyx_n_s_MemoryError;
2695 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
2696 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
2697 static PyObject *__pyx_n_b_O;
2698 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
2699 static PyObject *__pyx_n_s_PickleError;
2700 static PyObject *__pyx_n_s_RuntimeError;
2701 static PyObject *__pyx_kp_u_The_input_vector_and_product_sho;
2702 static PyObject *__pyx_n_s_TypeError;
2703 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
2704 static PyObject *__pyx_n_s_ValueError;
2705 static PyObject *__pyx_kp_u_Vector_type_should_be_either_flo;
2706 static PyObject *__pyx_n_s_View_MemoryView;
2707 static PyObject *__pyx_kp_u_Wrong_accessors_is_called_The_ty;
2708 static PyObject *__pyx_n_s_allocate_buffer;
2709 static PyObject *__pyx_n_s_array;
2710 static PyObject *__pyx_n_s_astype;
2711 static PyObject *__pyx_n_s_base;
2712 static PyObject *__pyx_n_s_c;
2713 static PyObject *__pyx_n_u_c;
2714 static PyObject *__pyx_n_s_class;
2715 static PyObject *__pyx_n_s_cline_in_traceback;
2716 static PyObject *__pyx_kp_s_contiguous_and_direct;
2717 static PyObject *__pyx_kp_s_contiguous_and_indirect;
2718 static PyObject *__pyx_n_s_dict;
2719 static PyObject *__pyx_n_s_dot;
2720 static PyObject *__pyx_n_s_dtype;
2721 static PyObject *__pyx_n_s_dtype_is_object;
2722 static PyObject *__pyx_n_s_encode;
2723 static PyObject *__pyx_n_s_enumerate;
2724 static PyObject *__pyx_n_s_error;
2725 static PyObject *__pyx_n_s_flags;
2726 static PyObject *__pyx_n_b_float128;
2727 static PyObject *__pyx_n_u_float128;
2728 static PyObject *__pyx_n_b_float32;
2729 static PyObject *__pyx_n_u_float32;
2730 static PyObject *__pyx_n_b_float64;
2731 static PyObject *__pyx_n_u_float64;
2732 static PyObject *__pyx_n_s_format;
2733 static PyObject *__pyx_n_s_fortran;
2734 static PyObject *__pyx_n_u_fortran;
2735 static PyObject *__pyx_n_s_get_data_type_name;
2736 static PyObject *__pyx_n_s_get_num_parameters;
2737 static PyObject *__pyx_n_s_getstate;
2738 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
2739 static PyObject *__pyx_n_s_id;
2740 static PyObject *__pyx_kp_s_imate__c_linear_operator_py_c_li;
2741 static PyObject *__pyx_n_s_imate__c_linear_operator_py_c_li_2;
2742 static PyObject *__pyx_n_s_import;
2743 static PyObject *__pyx_n_s_isscalar;
2744 static PyObject *__pyx_n_s_itemsize;
2745 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
2746 static PyObject *__pyx_n_s_main;
2747 static PyObject *__pyx_n_s_memview;
2748 static PyObject *__pyx_n_s_mode;
2749 static PyObject *__pyx_n_s_name;
2750 static PyObject *__pyx_n_s_name_2;
2751 static PyObject *__pyx_n_s_ndim;
2752 static PyObject *__pyx_n_s_new;
2753 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2754 static PyObject *__pyx_n_s_numpy;
2755 static PyObject *__pyx_n_s_obj;
2756 static PyObject *__pyx_n_s_pack;
2757 static PyObject *__pyx_n_s_parameters;
2758 static PyObject *__pyx_n_s_pickle;
2759 static PyObject *__pyx_n_s_product;
2760 static PyObject *__pyx_n_s_pycLinearOperator;
2761 static PyObject *__pyx_n_s_pycLinearOperator___reduce_cytho;
2762 static PyObject *__pyx_n_s_pycLinearOperator___setstate_cyt;
2763 static PyObject *__pyx_n_s_pycLinearOperator_dot;
2764 static PyObject *__pyx_n_s_pycLinearOperator_get_data_type;
2765 static PyObject *__pyx_n_s_pycLinearOperator_get_num_parame;
2766 static PyObject *__pyx_n_s_pycLinearOperator_set_parameters;
2767 static PyObject *__pyx_n_s_pycLinearOperator_transpose_dot;
2768 static PyObject *__pyx_n_s_pyx_PickleError;
2769 static PyObject *__pyx_n_s_pyx_checksum;
2770 static PyObject *__pyx_n_s_pyx_getbuffer;
2771 static PyObject *__pyx_n_s_pyx_result;
2772 static PyObject *__pyx_n_s_pyx_state;
2773 static PyObject *__pyx_n_s_pyx_type;
2774 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
2775 static PyObject *__pyx_n_s_pyx_vtable;
2776 static PyObject *__pyx_n_s_range;
2777 static PyObject *__pyx_n_s_reduce;
2778 static PyObject *__pyx_n_s_reduce_cython;
2779 static PyObject *__pyx_n_s_reduce_ex;
2780 static PyObject *__pyx_n_s_self;
2781 static PyObject *__pyx_n_s_set_parameters;
2782 static PyObject *__pyx_n_s_setstate;
2783 static PyObject *__pyx_n_s_setstate_cython;
2784 static PyObject *__pyx_n_s_shape;
2785 static PyObject *__pyx_n_s_size;
2786 static PyObject *__pyx_n_s_start;
2787 static PyObject *__pyx_n_s_step;
2788 static PyObject *__pyx_n_s_stop;
2789 static PyObject *__pyx_kp_s_strided_and_direct;
2790 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
2791 static PyObject *__pyx_kp_s_strided_and_indirect;
2792 static PyObject *__pyx_kp_s_stringsource;
2793 static PyObject *__pyx_n_s_struct;
2794 static PyObject *__pyx_n_s_test;
2795 static PyObject *__pyx_n_s_transpose_dot;
2796 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
2797 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
2798 static PyObject *__pyx_n_s_unpack;
2799 static PyObject *__pyx_n_s_update;
2800 static PyObject *__pyx_n_s_vector;
2801 static int __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator___cinit__(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto */
2802 static void __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_2__dealloc__(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto */
2803 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto */
2804 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto */
2805 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_parameters_); /* proto */
2806 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_10dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product); /* proto */
2807 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_12transpose_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product); /* proto */
2808 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self); /* proto */
2809 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2810 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
2811 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2812 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2813 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2814 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2815 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
2816 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
2817 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
2818 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
2819 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2820 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
2821 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2822 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2823 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
2824 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
2825 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2826 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
2827 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
2828 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2829 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2830 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2831 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2832 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2833 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2834 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2835 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2836 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2837 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2838 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2839 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2840 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2841 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2842 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2843 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2844 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2845 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2846 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2847 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2848 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2849 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2850 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2851 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
2852 static PyObject *__pyx_tp_new_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2853 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2854 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2855 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2856 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2857 static PyObject *__pyx_int_0;
2858 static PyObject *__pyx_int_1;
2859 static PyObject *__pyx_int_112105877;
2860 static PyObject *__pyx_int_136983863;
2861 static PyObject *__pyx_int_184977713;
2862 static PyObject *__pyx_int_neg_1;
2863 static PyObject *__pyx_tuple_;
2864 static PyObject *__pyx_tuple__2;
2865 static PyObject *__pyx_tuple__5;
2866 static PyObject *__pyx_tuple__6;
2867 static PyObject *__pyx_tuple__7;
2868 static PyObject *__pyx_tuple__8;
2869 static PyObject *__pyx_slice__32;
2870 static PyObject *__pyx_tuple__11;
2871 static PyObject *__pyx_tuple__12;
2872 static PyObject *__pyx_tuple__15;
2873 static PyObject *__pyx_tuple__17;
2874 static PyObject *__pyx_tuple__18;
2875 static PyObject *__pyx_tuple__19;
2876 static PyObject *__pyx_tuple__20;
2877 static PyObject *__pyx_tuple__21;
2878 static PyObject *__pyx_tuple__22;
2879 static PyObject *__pyx_tuple__23;
2880 static PyObject *__pyx_tuple__24;
2881 static PyObject *__pyx_tuple__25;
2882 static PyObject *__pyx_tuple__26;
2883 static PyObject *__pyx_tuple__27;
2884 static PyObject *__pyx_tuple__28;
2885 static PyObject *__pyx_tuple__29;
2886 static PyObject *__pyx_tuple__30;
2887 static PyObject *__pyx_tuple__31;
2888 static PyObject *__pyx_tuple__33;
2889 static PyObject *__pyx_tuple__34;
2890 static PyObject *__pyx_tuple__35;
2891 static PyObject *__pyx_tuple__37;
2892 static PyObject *__pyx_tuple__38;
2893 static PyObject *__pyx_tuple__39;
2894 static PyObject *__pyx_tuple__40;
2895 static PyObject *__pyx_tuple__41;
2896 static PyObject *__pyx_tuple__42;
2897 static PyObject *__pyx_tuple__43;
2898 static PyObject *__pyx_tuple__44;
2899 static PyObject *__pyx_tuple__45;
2900 static PyObject *__pyx_tuple__46;
2901 static PyObject *__pyx_tuple__47;
2902 static PyObject *__pyx_tuple__48;
2903 static PyObject *__pyx_tuple__49;
2904 static PyObject *__pyx_tuple__50;
2905 static PyObject *__pyx_codeobj__3;
2906 static PyObject *__pyx_codeobj__4;
2907 static PyObject *__pyx_codeobj__9;
2908 static PyObject *__pyx_codeobj__10;
2909 static PyObject *__pyx_codeobj__13;
2910 static PyObject *__pyx_codeobj__14;
2911 static PyObject *__pyx_codeobj__16;
2912 static PyObject *__pyx_codeobj__36;
2913 /* Late includes */
2914 
2915 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":34
2916  * # =========
2917  *
2918  * def __cinit__(self): # <<<<<<<<<<<<<<
2919  * """
2920  * Initializes attributes to zero.
2921  */
2922 
2923 /* Python wrapper */
2924 static int __pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2925 static int __pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2926  int __pyx_r;
2927  __Pyx_RefNannyDeclarations
2928  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2929  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
2930  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
2931  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
2932  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator___cinit__(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self));
2933 
2934  /* function exit code */
2935  __Pyx_RefNannyFinishContext();
2936  return __pyx_r;
2937 }
2938 
2939 static int __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator___cinit__(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
2940  __pyx_t_5imate_12_definitions_5types_LongIndexType __pyx_v_long_index;
2941  int __pyx_v_unsigned_type;
2942  int __pyx_r;
2943  __Pyx_TraceDeclarations
2944  __Pyx_RefNannyDeclarations
2945  int __pyx_t_1;
2946  PyObject *__pyx_t_2 = NULL;
2947  int __pyx_lineno = 0;
2948  const char *__pyx_filename = NULL;
2949  int __pyx_clineno = 0;
2950  __Pyx_RefNannySetupContext("__cinit__", 0);
2951  __Pyx_TraceCall("__cinit__", __pyx_f[0], 34, 0, __PYX_ERR(0, 34, __pyx_L1_error));
2952 
2953  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":40
2954  *
2955  * # Initialize member data
2956  * self.Aop_float = NULL # <<<<<<<<<<<<<<
2957  * self.Aop_double = NULL
2958  * self.Aop_long_double = NULL
2959  */
2960  __Pyx_TraceLine(40,0,__PYX_ERR(0, 40, __pyx_L1_error))
2961  __pyx_v_self->Aop_float = NULL;
2962 
2963  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":41
2964  * # Initialize member data
2965  * self.Aop_float = NULL
2966  * self.Aop_double = NULL # <<<<<<<<<<<<<<
2967  * self.Aop_long_double = NULL
2968  * self.data_type_name = NULL
2969  */
2970  __Pyx_TraceLine(41,0,__PYX_ERR(0, 41, __pyx_L1_error))
2971  __pyx_v_self->Aop_double = NULL;
2972 
2973  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":42
2974  * self.Aop_float = NULL
2975  * self.Aop_double = NULL
2976  * self.Aop_long_double = NULL # <<<<<<<<<<<<<<
2977  * self.data_type_name = NULL
2978  * self.long_index_type_name = NULL
2979  */
2980  __Pyx_TraceLine(42,0,__PYX_ERR(0, 42, __pyx_L1_error))
2981  __pyx_v_self->Aop_long_double = NULL;
2982 
2983  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":43
2984  * self.Aop_double = NULL
2985  * self.Aop_long_double = NULL
2986  * self.data_type_name = NULL # <<<<<<<<<<<<<<
2987  * self.long_index_type_name = NULL
2988  * self.parameters = None
2989  */
2990  __Pyx_TraceLine(43,0,__PYX_ERR(0, 43, __pyx_L1_error))
2991  __pyx_v_self->data_type_name = NULL;
2992 
2993  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":44
2994  * self.Aop_long_double = NULL
2995  * self.data_type_name = NULL
2996  * self.long_index_type_name = NULL # <<<<<<<<<<<<<<
2997  * self.parameters = None
2998  *
2999  */
3000  __Pyx_TraceLine(44,0,__PYX_ERR(0, 44, __pyx_L1_error))
3001  __pyx_v_self->long_index_type_name = NULL;
3002 
3003  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":45
3004  * self.data_type_name = NULL
3005  * self.long_index_type_name = NULL
3006  * self.parameters = None # <<<<<<<<<<<<<<
3007  *
3008  * # Check LongIndexType is a signed or unsigned type. If -1 overflows,
3009  */
3010  __Pyx_TraceLine(45,0,__PYX_ERR(0, 45, __pyx_L1_error))
3011  __Pyx_INCREF(Py_None);
3012  __Pyx_GIVEREF(Py_None);
3013  __Pyx_GOTREF(__pyx_v_self->parameters);
3014  __Pyx_DECREF(__pyx_v_self->parameters);
3015  __pyx_v_self->parameters = Py_None;
3016 
3017  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":49
3018  * # Check LongIndexType is a signed or unsigned type. If -1 overflows,
3019  * # the type is unsigned.
3020  * cdef LongIndexType long_index = -1 # <<<<<<<<<<<<<<
3021  * if long_index < 1:
3022  * unsigned_type = False
3023  */
3024  __Pyx_TraceLine(49,0,__PYX_ERR(0, 49, __pyx_L1_error))
3025  __pyx_v_long_index = -1;
3026 
3027  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":50
3028  * # the type is unsigned.
3029  * cdef LongIndexType long_index = -1
3030  * if long_index < 1: # <<<<<<<<<<<<<<
3031  * unsigned_type = False
3032  * else:
3033  */
3034  __Pyx_TraceLine(50,0,__PYX_ERR(0, 50, __pyx_L1_error))
3035  __pyx_t_1 = ((__pyx_v_long_index < 1) != 0);
3036  if (__pyx_t_1) {
3037 
3038  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":51
3039  * cdef LongIndexType long_index = -1
3040  * if long_index < 1:
3041  * unsigned_type = False # <<<<<<<<<<<<<<
3042  * else:
3043  * unsigned_type = True
3044  */
3045  __Pyx_TraceLine(51,0,__PYX_ERR(0, 51, __pyx_L1_error))
3046  __pyx_v_unsigned_type = 0;
3047 
3048  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":50
3049  * # the type is unsigned.
3050  * cdef LongIndexType long_index = -1
3051  * if long_index < 1: # <<<<<<<<<<<<<<
3052  * unsigned_type = False
3053  * else:
3054  */
3055  goto __pyx_L3;
3056  }
3057 
3058  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":53
3059  * unsigned_type = False
3060  * else:
3061  * unsigned_type = True # <<<<<<<<<<<<<<
3062  *
3063  * # Set the long index type name
3064  */
3065  __Pyx_TraceLine(53,0,__PYX_ERR(0, 53, __pyx_L1_error))
3066  /*else*/ {
3067  __pyx_v_unsigned_type = 1;
3068  }
3069  __pyx_L3:;
3070 
3071  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":56
3072  *
3073  * # Set the long index type name
3074  * if sizeof(LongIndexType) == 4: # <<<<<<<<<<<<<<
3075  * if unsigned_type:
3076  * self.long_index_type_name = r'uint32'
3077  */
3078  __Pyx_TraceLine(56,0,__PYX_ERR(0, 56, __pyx_L1_error))
3079  __pyx_t_1 = (((sizeof(__pyx_t_5imate_12_definitions_5types_LongIndexType)) == 4) != 0);
3080  if (__pyx_t_1) {
3081 
3082  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":57
3083  * # Set the long index type name
3084  * if sizeof(LongIndexType) == 4:
3085  * if unsigned_type: # <<<<<<<<<<<<<<
3086  * self.long_index_type_name = r'uint32'
3087  * else:
3088  */
3089  __Pyx_TraceLine(57,0,__PYX_ERR(0, 57, __pyx_L1_error))
3090  __pyx_t_1 = (__pyx_v_unsigned_type != 0);
3091  if (__pyx_t_1) {
3092 
3093  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":58
3094  * if sizeof(LongIndexType) == 4:
3095  * if unsigned_type:
3096  * self.long_index_type_name = r'uint32' # <<<<<<<<<<<<<<
3097  * else:
3098  * self.long_index_type_name = r'int32'
3099  */
3100  __Pyx_TraceLine(58,0,__PYX_ERR(0, 58, __pyx_L1_error))
3101  __pyx_v_self->long_index_type_name = ((char *)"uint32");
3102 
3103  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":57
3104  * # Set the long index type name
3105  * if sizeof(LongIndexType) == 4:
3106  * if unsigned_type: # <<<<<<<<<<<<<<
3107  * self.long_index_type_name = r'uint32'
3108  * else:
3109  */
3110  goto __pyx_L5;
3111  }
3112 
3113  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":60
3114  * self.long_index_type_name = r'uint32'
3115  * else:
3116  * self.long_index_type_name = r'int32' # <<<<<<<<<<<<<<
3117  * elif sizeof(LongIndexType) == 8:
3118  * if unsigned_type:
3119  */
3120  __Pyx_TraceLine(60,0,__PYX_ERR(0, 60, __pyx_L1_error))
3121  /*else*/ {
3122  __pyx_v_self->long_index_type_name = ((char *)"int32");
3123  }
3124  __pyx_L5:;
3125 
3126  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":56
3127  *
3128  * # Set the long index type name
3129  * if sizeof(LongIndexType) == 4: # <<<<<<<<<<<<<<
3130  * if unsigned_type:
3131  * self.long_index_type_name = r'uint32'
3132  */
3133  goto __pyx_L4;
3134  }
3135 
3136  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":61
3137  * else:
3138  * self.long_index_type_name = r'int32'
3139  * elif sizeof(LongIndexType) == 8: # <<<<<<<<<<<<<<
3140  * if unsigned_type:
3141  * self.long_index_type_name = r'uint64'
3142  */
3143  __Pyx_TraceLine(61,0,__PYX_ERR(0, 61, __pyx_L1_error))
3144  __pyx_t_1 = (((sizeof(__pyx_t_5imate_12_definitions_5types_LongIndexType)) == 8) != 0);
3145  if (likely(__pyx_t_1)) {
3146 
3147  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":62
3148  * self.long_index_type_name = r'int32'
3149  * elif sizeof(LongIndexType) == 8:
3150  * if unsigned_type: # <<<<<<<<<<<<<<
3151  * self.long_index_type_name = r'uint64'
3152  * else:
3153  */
3154  __Pyx_TraceLine(62,0,__PYX_ERR(0, 62, __pyx_L1_error))
3155  __pyx_t_1 = (__pyx_v_unsigned_type != 0);
3156  if (__pyx_t_1) {
3157 
3158  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":63
3159  * elif sizeof(LongIndexType) == 8:
3160  * if unsigned_type:
3161  * self.long_index_type_name = r'uint64' # <<<<<<<<<<<<<<
3162  * else:
3163  * self.long_index_type_name = r'int64'
3164  */
3165  __Pyx_TraceLine(63,0,__PYX_ERR(0, 63, __pyx_L1_error))
3166  __pyx_v_self->long_index_type_name = ((char *)"uint64");
3167 
3168  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":62
3169  * self.long_index_type_name = r'int32'
3170  * elif sizeof(LongIndexType) == 8:
3171  * if unsigned_type: # <<<<<<<<<<<<<<
3172  * self.long_index_type_name = r'uint64'
3173  * else:
3174  */
3175  goto __pyx_L6;
3176  }
3177 
3178  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":65
3179  * self.long_index_type_name = r'uint64'
3180  * else:
3181  * self.long_index_type_name = r'int64' # <<<<<<<<<<<<<<
3182  * else:
3183  * raise TypeError('"LongIndexType" has an unconventional byte size.')
3184  */
3185  __Pyx_TraceLine(65,0,__PYX_ERR(0, 65, __pyx_L1_error))
3186  /*else*/ {
3187  __pyx_v_self->long_index_type_name = ((char *)"int64");
3188  }
3189  __pyx_L6:;
3190 
3191  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":61
3192  * else:
3193  * self.long_index_type_name = r'int32'
3194  * elif sizeof(LongIndexType) == 8: # <<<<<<<<<<<<<<
3195  * if unsigned_type:
3196  * self.long_index_type_name = r'uint64'
3197  */
3198  goto __pyx_L4;
3199  }
3200 
3201  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":67
3202  * self.long_index_type_name = r'int64'
3203  * else:
3204  * raise TypeError('"LongIndexType" has an unconventional byte size.') # <<<<<<<<<<<<<<
3205  *
3206  * # ===========
3207  */
3208  __Pyx_TraceLine(67,0,__PYX_ERR(0, 67, __pyx_L1_error))
3209  /*else*/ {
3210  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error)
3211  __Pyx_GOTREF(__pyx_t_2);
3212  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
3213  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3214  __PYX_ERR(0, 67, __pyx_L1_error)
3215  }
3216  __pyx_L4:;
3217 
3218  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":34
3219  * # =========
3220  *
3221  * def __cinit__(self): # <<<<<<<<<<<<<<
3222  * """
3223  * Initializes attributes to zero.
3224  */
3225 
3226  /* function exit code */
3227  __pyx_r = 0;
3228  goto __pyx_L0;
3229  __pyx_L1_error:;
3230  __Pyx_XDECREF(__pyx_t_2);
3231  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3232  __pyx_r = -1;
3233  __pyx_L0:;
3234  __Pyx_TraceReturn(Py_None, 0);
3235  __Pyx_RefNannyFinishContext();
3236  return __pyx_r;
3237 }
3238 
3239 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":73
3240  * # ===========
3241  *
3242  * def __dealloc__(self): # <<<<<<<<<<<<<<
3243  * """
3244  * """
3245  */
3246 
3247 /* Python wrapper */
3248 static void __pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
3249 static void __pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_3__dealloc__(PyObject *__pyx_v_self) {
3250  __Pyx_RefNannyDeclarations
3251  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3252  __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_2__dealloc__(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self));
3253 
3254  /* function exit code */
3255  __Pyx_RefNannyFinishContext();
3256 }
3257 
3258 static void __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_2__dealloc__(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
3259  __Pyx_TraceDeclarations
3260  __Pyx_RefNannyDeclarations
3261  int __pyx_t_1;
3262  int __pyx_lineno = 0;
3263  const char *__pyx_filename = NULL;
3264  int __pyx_clineno = 0;
3265  __Pyx_RefNannySetupContext("__dealloc__", 0);
3266  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 73, 0, __PYX_ERR(0, 73, __pyx_L1_error));
3267 
3268  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":77
3269  * """
3270  *
3271  * if self.Aop_float != NULL: # <<<<<<<<<<<<<<
3272  * del self.Aop_float
3273  * self.Aop_float = NULL
3274  */
3275  __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error))
3276  __pyx_t_1 = ((__pyx_v_self->Aop_float != NULL) != 0);
3277  if (__pyx_t_1) {
3278 
3279  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":78
3280  *
3281  * if self.Aop_float != NULL:
3282  * del self.Aop_float # <<<<<<<<<<<<<<
3283  * self.Aop_float = NULL
3284  *
3285  */
3286  __Pyx_TraceLine(78,0,__PYX_ERR(0, 78, __pyx_L1_error))
3287  delete __pyx_v_self->Aop_float;
3288 
3289  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":79
3290  * if self.Aop_float != NULL:
3291  * del self.Aop_float
3292  * self.Aop_float = NULL # <<<<<<<<<<<<<<
3293  *
3294  * if self.Aop_double != NULL:
3295  */
3296  __Pyx_TraceLine(79,0,__PYX_ERR(0, 79, __pyx_L1_error))
3297  __pyx_v_self->Aop_float = NULL;
3298 
3299  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":77
3300  * """
3301  *
3302  * if self.Aop_float != NULL: # <<<<<<<<<<<<<<
3303  * del self.Aop_float
3304  * self.Aop_float = NULL
3305  */
3306  }
3307 
3308  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":81
3309  * self.Aop_float = NULL
3310  *
3311  * if self.Aop_double != NULL: # <<<<<<<<<<<<<<
3312  * del self.Aop_double
3313  * self.Aop_double = NULL
3314  */
3315  __Pyx_TraceLine(81,0,__PYX_ERR(0, 81, __pyx_L1_error))
3316  __pyx_t_1 = ((__pyx_v_self->Aop_double != NULL) != 0);
3317  if (__pyx_t_1) {
3318 
3319  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":82
3320  *
3321  * if self.Aop_double != NULL:
3322  * del self.Aop_double # <<<<<<<<<<<<<<
3323  * self.Aop_double = NULL
3324  *
3325  */
3326  __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L1_error))
3327  delete __pyx_v_self->Aop_double;
3328 
3329  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":83
3330  * if self.Aop_double != NULL:
3331  * del self.Aop_double
3332  * self.Aop_double = NULL # <<<<<<<<<<<<<<
3333  *
3334  * if self.Aop_long_double != NULL:
3335  */
3336  __Pyx_TraceLine(83,0,__PYX_ERR(0, 83, __pyx_L1_error))
3337  __pyx_v_self->Aop_double = NULL;
3338 
3339  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":81
3340  * self.Aop_float = NULL
3341  *
3342  * if self.Aop_double != NULL: # <<<<<<<<<<<<<<
3343  * del self.Aop_double
3344  * self.Aop_double = NULL
3345  */
3346  }
3347 
3348  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":85
3349  * self.Aop_double = NULL
3350  *
3351  * if self.Aop_long_double != NULL: # <<<<<<<<<<<<<<
3352  * del self.Aop_long_double
3353  * self.Aop_long_double = NULL
3354  */
3355  __Pyx_TraceLine(85,0,__PYX_ERR(0, 85, __pyx_L1_error))
3356  __pyx_t_1 = ((__pyx_v_self->Aop_long_double != NULL) != 0);
3357  if (__pyx_t_1) {
3358 
3359  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":86
3360  *
3361  * if self.Aop_long_double != NULL:
3362  * del self.Aop_long_double # <<<<<<<<<<<<<<
3363  * self.Aop_long_double = NULL
3364  *
3365  */
3366  __Pyx_TraceLine(86,0,__PYX_ERR(0, 86, __pyx_L1_error))
3367  delete __pyx_v_self->Aop_long_double;
3368 
3369  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":87
3370  * if self.Aop_long_double != NULL:
3371  * del self.Aop_long_double
3372  * self.Aop_long_double = NULL # <<<<<<<<<<<<<<
3373  *
3374  * # ============
3375  */
3376  __Pyx_TraceLine(87,0,__PYX_ERR(0, 87, __pyx_L1_error))
3377  __pyx_v_self->Aop_long_double = NULL;
3378 
3379  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":85
3380  * self.Aop_double = NULL
3381  *
3382  * if self.Aop_long_double != NULL: # <<<<<<<<<<<<<<
3383  * del self.Aop_long_double
3384  * self.Aop_long_double = NULL
3385  */
3386  }
3387 
3388  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":73
3389  * # ===========
3390  *
3391  * def __dealloc__(self): # <<<<<<<<<<<<<<
3392  * """
3393  * """
3394  */
3395 
3396  /* function exit code */
3397  goto __pyx_L0;
3398  __pyx_L1_error:;
3399  __Pyx_WriteUnraisable("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
3400  __pyx_L0:;
3401  __Pyx_TraceReturn(Py_None, 0);
3402  __Pyx_RefNannyFinishContext();
3403 }
3404 
3405 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":93
3406  * # ============
3407  *
3408  * cdef LongIndexType get_num_rows(self) except *: # <<<<<<<<<<<<<<
3409  * """
3410  * :return Number of rows of matrix.
3411  */
3412 
3413 static __pyx_t_5imate_12_definitions_5types_LongIndexType __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_rows(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
3414  __pyx_t_5imate_12_definitions_5types_LongIndexType __pyx_r;
3415  __Pyx_TraceDeclarations
3416  __Pyx_RefNannyDeclarations
3417  int __pyx_t_1;
3418  PyObject *__pyx_t_2 = NULL;
3419  int __pyx_t_3;
3420  int __pyx_lineno = 0;
3421  const char *__pyx_filename = NULL;
3422  int __pyx_clineno = 0;
3423  __Pyx_RefNannySetupContext("get_num_rows", 0);
3424  __Pyx_TraceCall("get_num_rows", __pyx_f[0], 93, 0, __PYX_ERR(0, 93, __pyx_L1_error));
3425 
3426  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":99
3427  * """
3428  *
3429  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3430  * return self.Aop_float.get_num_rows()
3431  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3432  */
3433  __Pyx_TraceLine(99,0,__PYX_ERR(0, 99, __pyx_L1_error))
3434  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
3435  __Pyx_GOTREF(__pyx_t_2);
3436  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 99, __pyx_L1_error)
3437  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3438  if (__pyx_t_3) {
3439  } else {
3440  __pyx_t_1 = __pyx_t_3;
3441  goto __pyx_L4_bool_binop_done;
3442  }
3443  __pyx_t_3 = ((__pyx_v_self->Aop_float != NULL) != 0);
3444  __pyx_t_1 = __pyx_t_3;
3445  __pyx_L4_bool_binop_done:;
3446  if (__pyx_t_1) {
3447 
3448  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":100
3449  *
3450  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3451  * return self.Aop_float.get_num_rows() # <<<<<<<<<<<<<<
3452  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3453  * return self.Aop_double.get_num_rows()
3454  */
3455  __Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error))
3456  __pyx_r = __pyx_v_self->Aop_float->get_num_rows();
3457  goto __pyx_L0;
3458 
3459  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":99
3460  * """
3461  *
3462  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3463  * return self.Aop_float.get_num_rows()
3464  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3465  */
3466  }
3467 
3468  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":101
3469  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3470  * return self.Aop_float.get_num_rows()
3471  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3472  * return self.Aop_double.get_num_rows()
3473  * elif self.data_type_name == b'float128' and \
3474  */
3475  __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error))
3476  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
3477  __Pyx_GOTREF(__pyx_t_2);
3478  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 101, __pyx_L1_error)
3479  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3480  if (__pyx_t_3) {
3481  } else {
3482  __pyx_t_1 = __pyx_t_3;
3483  goto __pyx_L6_bool_binop_done;
3484  }
3485  __pyx_t_3 = ((__pyx_v_self->Aop_double != NULL) != 0);
3486  __pyx_t_1 = __pyx_t_3;
3487  __pyx_L6_bool_binop_done:;
3488  if (__pyx_t_1) {
3489 
3490  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":102
3491  * return self.Aop_float.get_num_rows()
3492  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3493  * return self.Aop_double.get_num_rows() # <<<<<<<<<<<<<<
3494  * elif self.data_type_name == b'float128' and \
3495  * self.Aop_long_double != NULL:
3496  */
3497  __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error))
3498  __pyx_r = __pyx_v_self->Aop_double->get_num_rows();
3499  goto __pyx_L0;
3500 
3501  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":101
3502  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3503  * return self.Aop_float.get_num_rows()
3504  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3505  * return self.Aop_double.get_num_rows()
3506  * elif self.data_type_name == b'float128' and \
3507  */
3508  }
3509 
3510  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":103
3511  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3512  * return self.Aop_double.get_num_rows()
3513  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3514  * self.Aop_long_double != NULL:
3515  * return self.Aop_long_double.get_num_rows()
3516  */
3517  __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error))
3518  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
3519  __Pyx_GOTREF(__pyx_t_2);
3520  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float128, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 103, __pyx_L1_error)
3521  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3522  if (__pyx_t_3) {
3523  } else {
3524  __pyx_t_1 = __pyx_t_3;
3525  goto __pyx_L8_bool_binop_done;
3526  }
3527 
3528  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":104
3529  * return self.Aop_double.get_num_rows()
3530  * elif self.data_type_name == b'float128' and \
3531  * self.Aop_long_double != NULL: # <<<<<<<<<<<<<<
3532  * return self.Aop_long_double.get_num_rows()
3533  * else:
3534  */
3535  __Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error))
3536  __pyx_t_3 = ((__pyx_v_self->Aop_long_double != NULL) != 0);
3537  __pyx_t_1 = __pyx_t_3;
3538  __pyx_L8_bool_binop_done:;
3539 
3540  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":103
3541  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3542  * return self.Aop_double.get_num_rows()
3543  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3544  * self.Aop_long_double != NULL:
3545  * return self.Aop_long_double.get_num_rows()
3546  */
3547  __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error))
3548  if (likely(__pyx_t_1)) {
3549 
3550  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":105
3551  * elif self.data_type_name == b'float128' and \
3552  * self.Aop_long_double != NULL:
3553  * return self.Aop_long_double.get_num_rows() # <<<<<<<<<<<<<<
3554  * else:
3555  * raise ValueError('Linear operator is not set.')
3556  */
3557  __Pyx_TraceLine(105,0,__PYX_ERR(0, 105, __pyx_L1_error))
3558  __pyx_r = __pyx_v_self->Aop_long_double->get_num_rows();
3559  goto __pyx_L0;
3560 
3561  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":103
3562  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3563  * return self.Aop_double.get_num_rows()
3564  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3565  * self.Aop_long_double != NULL:
3566  * return self.Aop_long_double.get_num_rows()
3567  */
3568  }
3569 
3570  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":107
3571  * return self.Aop_long_double.get_num_rows()
3572  * else:
3573  * raise ValueError('Linear operator is not set.') # <<<<<<<<<<<<<<
3574  *
3575  * # ===============
3576  */
3577  __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error))
3578  /*else*/ {
3579  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
3580  __Pyx_GOTREF(__pyx_t_2);
3581  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
3582  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3583  __PYX_ERR(0, 107, __pyx_L1_error)
3584  }
3585 
3586  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":93
3587  * # ============
3588  *
3589  * cdef LongIndexType get_num_rows(self) except *: # <<<<<<<<<<<<<<
3590  * """
3591  * :return Number of rows of matrix.
3592  */
3593 
3594  /* function exit code */
3595  __pyx_L1_error:;
3596  __Pyx_XDECREF(__pyx_t_2);
3597  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_num_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
3598  __pyx_r = 0;
3599  __pyx_L0:;
3600  __Pyx_TraceReturn(Py_None, 0);
3601  __Pyx_RefNannyFinishContext();
3602  return __pyx_r;
3603 }
3604 
3605 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":113
3606  * # ===============
3607  *
3608  * cdef LongIndexType get_num_columns(self) except *: # <<<<<<<<<<<<<<
3609  * """
3610  * :return Number of rows of matrix.
3611  */
3612 
3613 static __pyx_t_5imate_12_definitions_5types_LongIndexType __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_columns(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
3614  __pyx_t_5imate_12_definitions_5types_LongIndexType __pyx_r;
3615  __Pyx_TraceDeclarations
3616  __Pyx_RefNannyDeclarations
3617  int __pyx_t_1;
3618  PyObject *__pyx_t_2 = NULL;
3619  int __pyx_t_3;
3620  int __pyx_lineno = 0;
3621  const char *__pyx_filename = NULL;
3622  int __pyx_clineno = 0;
3623  __Pyx_RefNannySetupContext("get_num_columns", 0);
3624  __Pyx_TraceCall("get_num_columns", __pyx_f[0], 113, 0, __PYX_ERR(0, 113, __pyx_L1_error));
3625 
3626  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":119
3627  * """
3628  *
3629  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3630  * return self.Aop_float.get_num_columns()
3631  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3632  */
3633  __Pyx_TraceLine(119,0,__PYX_ERR(0, 119, __pyx_L1_error))
3634  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
3635  __Pyx_GOTREF(__pyx_t_2);
3636  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
3637  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3638  if (__pyx_t_3) {
3639  } else {
3640  __pyx_t_1 = __pyx_t_3;
3641  goto __pyx_L4_bool_binop_done;
3642  }
3643  __pyx_t_3 = ((__pyx_v_self->Aop_float != NULL) != 0);
3644  __pyx_t_1 = __pyx_t_3;
3645  __pyx_L4_bool_binop_done:;
3646  if (__pyx_t_1) {
3647 
3648  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":120
3649  *
3650  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3651  * return self.Aop_float.get_num_columns() # <<<<<<<<<<<<<<
3652  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3653  * return self.Aop_double.get_num_columns()
3654  */
3655  __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error))
3656  __pyx_r = __pyx_v_self->Aop_float->get_num_columns();
3657  goto __pyx_L0;
3658 
3659  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":119
3660  * """
3661  *
3662  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3663  * return self.Aop_float.get_num_columns()
3664  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3665  */
3666  }
3667 
3668  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":121
3669  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3670  * return self.Aop_float.get_num_columns()
3671  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3672  * return self.Aop_double.get_num_columns()
3673  * elif self.data_type_name == b'float128' and \
3674  */
3675  __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error))
3676  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error)
3677  __Pyx_GOTREF(__pyx_t_2);
3678  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 121, __pyx_L1_error)
3679  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3680  if (__pyx_t_3) {
3681  } else {
3682  __pyx_t_1 = __pyx_t_3;
3683  goto __pyx_L6_bool_binop_done;
3684  }
3685  __pyx_t_3 = ((__pyx_v_self->Aop_double != NULL) != 0);
3686  __pyx_t_1 = __pyx_t_3;
3687  __pyx_L6_bool_binop_done:;
3688  if (__pyx_t_1) {
3689 
3690  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":122
3691  * return self.Aop_float.get_num_columns()
3692  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3693  * return self.Aop_double.get_num_columns() # <<<<<<<<<<<<<<
3694  * elif self.data_type_name == b'float128' and \
3695  * self.Aop_long_double != NULL:
3696  */
3697  __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error))
3698  __pyx_r = __pyx_v_self->Aop_double->get_num_columns();
3699  goto __pyx_L0;
3700 
3701  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":121
3702  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3703  * return self.Aop_float.get_num_columns()
3704  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3705  * return self.Aop_double.get_num_columns()
3706  * elif self.data_type_name == b'float128' and \
3707  */
3708  }
3709 
3710  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":123
3711  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3712  * return self.Aop_double.get_num_columns()
3713  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3714  * self.Aop_long_double != NULL:
3715  * return self.Aop_long_double.get_num_columns()
3716  */
3717  __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error))
3718  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
3719  __Pyx_GOTREF(__pyx_t_2);
3720  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float128, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 123, __pyx_L1_error)
3721  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3722  if (__pyx_t_3) {
3723  } else {
3724  __pyx_t_1 = __pyx_t_3;
3725  goto __pyx_L8_bool_binop_done;
3726  }
3727 
3728  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":124
3729  * return self.Aop_double.get_num_columns()
3730  * elif self.data_type_name == b'float128' and \
3731  * self.Aop_long_double != NULL: # <<<<<<<<<<<<<<
3732  * return self.Aop_long_double.get_num_columns()
3733  * else:
3734  */
3735  __Pyx_TraceLine(124,0,__PYX_ERR(0, 124, __pyx_L1_error))
3736  __pyx_t_3 = ((__pyx_v_self->Aop_long_double != NULL) != 0);
3737  __pyx_t_1 = __pyx_t_3;
3738  __pyx_L8_bool_binop_done:;
3739 
3740  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":123
3741  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3742  * return self.Aop_double.get_num_columns()
3743  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3744  * self.Aop_long_double != NULL:
3745  * return self.Aop_long_double.get_num_columns()
3746  */
3747  __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error))
3748  if (likely(__pyx_t_1)) {
3749 
3750  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":125
3751  * elif self.data_type_name == b'float128' and \
3752  * self.Aop_long_double != NULL:
3753  * return self.Aop_long_double.get_num_columns() # <<<<<<<<<<<<<<
3754  * else:
3755  * raise ValueError('Linear operator is not set.')
3756  */
3757  __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error))
3758  __pyx_r = __pyx_v_self->Aop_long_double->get_num_columns();
3759  goto __pyx_L0;
3760 
3761  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":123
3762  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3763  * return self.Aop_double.get_num_columns()
3764  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3765  * self.Aop_long_double != NULL:
3766  * return self.Aop_long_double.get_num_columns()
3767  */
3768  }
3769 
3770  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":127
3771  * return self.Aop_long_double.get_num_columns()
3772  * else:
3773  * raise ValueError('Linear operator is not set.') # <<<<<<<<<<<<<<
3774  *
3775  * # ==================
3776  */
3777  __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error))
3778  /*else*/ {
3779  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
3780  __Pyx_GOTREF(__pyx_t_2);
3781  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
3782  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3783  __PYX_ERR(0, 127, __pyx_L1_error)
3784  }
3785 
3786  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":113
3787  * # ===============
3788  *
3789  * cdef LongIndexType get_num_columns(self) except *: # <<<<<<<<<<<<<<
3790  * """
3791  * :return Number of rows of matrix.
3792  */
3793 
3794  /* function exit code */
3795  __pyx_L1_error:;
3796  __Pyx_XDECREF(__pyx_t_2);
3797  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_num_columns", __pyx_clineno, __pyx_lineno, __pyx_filename);
3798  __pyx_r = 0;
3799  __pyx_L0:;
3800  __Pyx_TraceReturn(Py_None, 0);
3801  __Pyx_RefNannyFinishContext();
3802  return __pyx_r;
3803 }
3804 
3805 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":133
3806  * # ==================
3807  *
3808  * def get_num_parameters(self): # <<<<<<<<<<<<<<
3809  * """
3810  * :return: Number of parameters.
3811  */
3812 
3813 /* Python wrapper */
3814 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3815 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters[] = "pycLinearOperator.get_num_parameters(self)\n\n :return: Number of parameters.\n :rtype: IndexType\n ";
3816 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters = {"get_num_parameters", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters};
3817 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3818  PyObject *__pyx_r = 0;
3819  __Pyx_RefNannyDeclarations
3820  __Pyx_RefNannySetupContext("get_num_parameters (wrapper)", 0);
3821  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self));
3822 
3823  /* function exit code */
3824  __Pyx_RefNannyFinishContext();
3825  return __pyx_r;
3826 }
3827 
3828 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
3829  PyObject *__pyx_r = NULL;
3830  __Pyx_TraceDeclarations
3831  __Pyx_RefNannyDeclarations
3832  int __pyx_t_1;
3833  PyObject *__pyx_t_2 = NULL;
3834  int __pyx_t_3;
3835  int __pyx_lineno = 0;
3836  const char *__pyx_filename = NULL;
3837  int __pyx_clineno = 0;
3838  __Pyx_TraceFrameInit(__pyx_codeobj__3)
3839  __Pyx_RefNannySetupContext("get_num_parameters", 0);
3840  __Pyx_TraceCall("get_num_parameters", __pyx_f[0], 133, 0, __PYX_ERR(0, 133, __pyx_L1_error));
3841 
3842  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":139
3843  * """
3844  *
3845  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3846  * return self.Aop_float.get_num_parameters()
3847  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3848  */
3849  __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error))
3850  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
3851  __Pyx_GOTREF(__pyx_t_2);
3852  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float32, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
3853  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3854  if (__pyx_t_3) {
3855  } else {
3856  __pyx_t_1 = __pyx_t_3;
3857  goto __pyx_L4_bool_binop_done;
3858  }
3859  __pyx_t_3 = ((__pyx_v_self->Aop_float != NULL) != 0);
3860  __pyx_t_1 = __pyx_t_3;
3861  __pyx_L4_bool_binop_done:;
3862  if (__pyx_t_1) {
3863 
3864  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":140
3865  *
3866  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3867  * return self.Aop_float.get_num_parameters() # <<<<<<<<<<<<<<
3868  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3869  * return self.Aop_double.get_num_parameters()
3870  */
3871  __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error))
3872  __Pyx_XDECREF(__pyx_r);
3873  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->Aop_float->get_num_parameters()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
3874  __Pyx_GOTREF(__pyx_t_2);
3875  __pyx_r = __pyx_t_2;
3876  __pyx_t_2 = 0;
3877  goto __pyx_L0;
3878 
3879  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":139
3880  * """
3881  *
3882  * if self.data_type_name == b'float32' and self.Aop_float != NULL: # <<<<<<<<<<<<<<
3883  * return self.Aop_float.get_num_parameters()
3884  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3885  */
3886  }
3887 
3888  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":141
3889  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3890  * return self.Aop_float.get_num_parameters()
3891  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3892  * return self.Aop_double.get_num_parameters()
3893  * elif self.data_type_name == b'float128' and \
3894  */
3895  __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error))
3896  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
3897  __Pyx_GOTREF(__pyx_t_2);
3898  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float64, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 141, __pyx_L1_error)
3899  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3900  if (__pyx_t_3) {
3901  } else {
3902  __pyx_t_1 = __pyx_t_3;
3903  goto __pyx_L6_bool_binop_done;
3904  }
3905  __pyx_t_3 = ((__pyx_v_self->Aop_double != NULL) != 0);
3906  __pyx_t_1 = __pyx_t_3;
3907  __pyx_L6_bool_binop_done:;
3908  if (__pyx_t_1) {
3909 
3910  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":142
3911  * return self.Aop_float.get_num_parameters()
3912  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3913  * return self.Aop_double.get_num_parameters() # <<<<<<<<<<<<<<
3914  * elif self.data_type_name == b'float128' and \
3915  * self.Aop_long_double != NULL:
3916  */
3917  __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error))
3918  __Pyx_XDECREF(__pyx_r);
3919  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->Aop_double->get_num_parameters()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
3920  __Pyx_GOTREF(__pyx_t_2);
3921  __pyx_r = __pyx_t_2;
3922  __pyx_t_2 = 0;
3923  goto __pyx_L0;
3924 
3925  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":141
3926  * if self.data_type_name == b'float32' and self.Aop_float != NULL:
3927  * return self.Aop_float.get_num_parameters()
3928  * elif self.data_type_name == b'float64' and self.Aop_double != NULL: # <<<<<<<<<<<<<<
3929  * return self.Aop_double.get_num_parameters()
3930  * elif self.data_type_name == b'float128' and \
3931  */
3932  }
3933 
3934  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":143
3935  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3936  * return self.Aop_double.get_num_parameters()
3937  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3938  * self.Aop_long_double != NULL:
3939  * return self.Aop_long_double.get_num_parameters()
3940  */
3941  __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error))
3942  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
3943  __Pyx_GOTREF(__pyx_t_2);
3944  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float128, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 143, __pyx_L1_error)
3945  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3946  if (__pyx_t_3) {
3947  } else {
3948  __pyx_t_1 = __pyx_t_3;
3949  goto __pyx_L8_bool_binop_done;
3950  }
3951 
3952  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":144
3953  * return self.Aop_double.get_num_parameters()
3954  * elif self.data_type_name == b'float128' and \
3955  * self.Aop_long_double != NULL: # <<<<<<<<<<<<<<
3956  * return self.Aop_long_double.get_num_parameters()
3957  * else:
3958  */
3959  __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error))
3960  __pyx_t_3 = ((__pyx_v_self->Aop_long_double != NULL) != 0);
3961  __pyx_t_1 = __pyx_t_3;
3962  __pyx_L8_bool_binop_done:;
3963 
3964  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":143
3965  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3966  * return self.Aop_double.get_num_parameters()
3967  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3968  * self.Aop_long_double != NULL:
3969  * return self.Aop_long_double.get_num_parameters()
3970  */
3971  __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error))
3972  if (likely(__pyx_t_1)) {
3973 
3974  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":145
3975  * elif self.data_type_name == b'float128' and \
3976  * self.Aop_long_double != NULL:
3977  * return self.Aop_long_double.get_num_parameters() # <<<<<<<<<<<<<<
3978  * else:
3979  * raise ValueError('Linear operator is not set.')
3980  */
3981  __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error))
3982  __Pyx_XDECREF(__pyx_r);
3983  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->Aop_long_double->get_num_parameters()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
3984  __Pyx_GOTREF(__pyx_t_2);
3985  __pyx_r = __pyx_t_2;
3986  __pyx_t_2 = 0;
3987  goto __pyx_L0;
3988 
3989  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":143
3990  * elif self.data_type_name == b'float64' and self.Aop_double != NULL:
3991  * return self.Aop_double.get_num_parameters()
3992  * elif self.data_type_name == b'float128' and \ # <<<<<<<<<<<<<<
3993  * self.Aop_long_double != NULL:
3994  * return self.Aop_long_double.get_num_parameters()
3995  */
3996  }
3997 
3998  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":147
3999  * return self.Aop_long_double.get_num_parameters()
4000  * else:
4001  * raise ValueError('Linear operator is not set.') # <<<<<<<<<<<<<<
4002  *
4003  * # ==================
4004  */
4005  __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error))
4006  /*else*/ {
4007  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
4008  __Pyx_GOTREF(__pyx_t_2);
4009  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4010  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4011  __PYX_ERR(0, 147, __pyx_L1_error)
4012  }
4013 
4014  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":133
4015  * # ==================
4016  *
4017  * def get_num_parameters(self): # <<<<<<<<<<<<<<
4018  * """
4019  * :return: Number of parameters.
4020  */
4021 
4022  /* function exit code */
4023  __pyx_L1_error:;
4024  __Pyx_XDECREF(__pyx_t_2);
4025  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_num_parameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
4026  __pyx_r = NULL;
4027  __pyx_L0:;
4028  __Pyx_XGIVEREF(__pyx_r);
4029  __Pyx_TraceReturn(__pyx_r, 0);
4030  __Pyx_RefNannyFinishContext();
4031  return __pyx_r;
4032 }
4033 
4034 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":153
4035  * # ==================
4036  *
4037  * def get_data_type_name(self): # <<<<<<<<<<<<<<
4038  * """
4039  * """
4040  */
4041 
4042 /* Python wrapper */
4043 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4044 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name[] = "pycLinearOperator.get_data_type_name(self)\n\n ";
4045 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name = {"get_data_type_name", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name};
4046 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4047  PyObject *__pyx_r = 0;
4048  __Pyx_RefNannyDeclarations
4049  __Pyx_RefNannySetupContext("get_data_type_name (wrapper)", 0);
4050  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self));
4051 
4052  /* function exit code */
4053  __Pyx_RefNannyFinishContext();
4054  return __pyx_r;
4055 }
4056 
4057 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
4058  PyObject *__pyx_r = NULL;
4059  __Pyx_TraceDeclarations
4060  __Pyx_RefNannyDeclarations
4061  int __pyx_t_1;
4062  PyObject *__pyx_t_2 = NULL;
4063  int __pyx_lineno = 0;
4064  const char *__pyx_filename = NULL;
4065  int __pyx_clineno = 0;
4066  __Pyx_TraceFrameInit(__pyx_codeobj__4)
4067  __Pyx_RefNannySetupContext("get_data_type_name", 0);
4068  __Pyx_TraceCall("get_data_type_name", __pyx_f[0], 153, 0, __PYX_ERR(0, 153, __pyx_L1_error));
4069 
4070  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":157
4071  * """
4072  *
4073  * if self.data_type_name == NULL: # <<<<<<<<<<<<<<
4074  * raise RuntimeError('Linear operator data type is not set.')
4075  *
4076  */
4077  __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error))
4078  __pyx_t_1 = ((__pyx_v_self->data_type_name == NULL) != 0);
4079  if (unlikely(__pyx_t_1)) {
4080 
4081  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":158
4082  *
4083  * if self.data_type_name == NULL:
4084  * raise RuntimeError('Linear operator data type is not set.') # <<<<<<<<<<<<<<
4085  *
4086  * return self.data_type_name
4087  */
4088  __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error))
4089  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
4090  __Pyx_GOTREF(__pyx_t_2);
4091  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4092  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4093  __PYX_ERR(0, 158, __pyx_L1_error)
4094 
4095  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":157
4096  * """
4097  *
4098  * if self.data_type_name == NULL: # <<<<<<<<<<<<<<
4099  * raise RuntimeError('Linear operator data type is not set.')
4100  *
4101  */
4102  }
4103 
4104  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":160
4105  * raise RuntimeError('Linear operator data type is not set.')
4106  *
4107  * return self.data_type_name # <<<<<<<<<<<<<<
4108  *
4109  * # =========================
4110  */
4111  __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error))
4112  __Pyx_XDECREF(__pyx_r);
4113  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
4114  __Pyx_GOTREF(__pyx_t_2);
4115  __pyx_r = __pyx_t_2;
4116  __pyx_t_2 = 0;
4117  goto __pyx_L0;
4118 
4119  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":153
4120  * # ==================
4121  *
4122  * def get_data_type_name(self): # <<<<<<<<<<<<<<
4123  * """
4124  * """
4125  */
4126 
4127  /* function exit code */
4128  __pyx_L1_error:;
4129  __Pyx_XDECREF(__pyx_t_2);
4130  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_data_type_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
4131  __pyx_r = NULL;
4132  __pyx_L0:;
4133  __Pyx_XGIVEREF(__pyx_r);
4134  __Pyx_TraceReturn(__pyx_r, 0);
4135  __Pyx_RefNannyFinishContext();
4136  return __pyx_r;
4137 }
4138 
4139 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":166
4140  * # =========================
4141  *
4142  * cdef cLinearOperator[float]* get_linear_operator_float(self) except *: # <<<<<<<<<<<<<<
4143  * """
4144  * """
4145  */
4146 
4147 static cLinearOperator<float> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_float(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
4148  cLinearOperator<float> *__pyx_r;
4149  __Pyx_TraceDeclarations
4150  __Pyx_RefNannyDeclarations
4151  int __pyx_t_1;
4152  PyObject *__pyx_t_2 = NULL;
4153  PyObject *__pyx_t_3 = NULL;
4154  int __pyx_lineno = 0;
4155  const char *__pyx_filename = NULL;
4156  int __pyx_clineno = 0;
4157  __Pyx_RefNannySetupContext("get_linear_operator_float", 0);
4158  __Pyx_TraceCall("get_linear_operator_float", __pyx_f[0], 166, 0, __PYX_ERR(0, 166, __pyx_L1_error));
4159 
4160  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":170
4161  * """
4162  *
4163  * if self.Aop_float == NULL: # <<<<<<<<<<<<<<
4164  * raise RuntimeError('Linear operator (float type) is not set.')
4165  *
4166  */
4167  __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __pyx_L1_error))
4168  __pyx_t_1 = ((__pyx_v_self->Aop_float == NULL) != 0);
4169  if (unlikely(__pyx_t_1)) {
4170 
4171  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":171
4172  *
4173  * if self.Aop_float == NULL:
4174  * raise RuntimeError('Linear operator (float type) is not set.') # <<<<<<<<<<<<<<
4175  *
4176  * if self.data_type_name != b'float32':
4177  */
4178  __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error))
4179  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
4180  __Pyx_GOTREF(__pyx_t_2);
4181  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4182  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4183  __PYX_ERR(0, 171, __pyx_L1_error)
4184 
4185  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":170
4186  * """
4187  *
4188  * if self.Aop_float == NULL: # <<<<<<<<<<<<<<
4189  * raise RuntimeError('Linear operator (float type) is not set.')
4190  *
4191  */
4192  }
4193 
4194  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":173
4195  * raise RuntimeError('Linear operator (float type) is not set.')
4196  *
4197  * if self.data_type_name != b'float32': # <<<<<<<<<<<<<<
4198  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4199  * 'LinearOperator object is: %s'
4200  */
4201  __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L1_error))
4202  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
4203  __Pyx_GOTREF(__pyx_t_2);
4204  __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float32, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
4205  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4206  if (unlikely(__pyx_t_1)) {
4207 
4208  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":176
4209  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4210  * 'LinearOperator object is: %s'
4211  * % self.data_type_name) # <<<<<<<<<<<<<<
4212  *
4213  * return self.Aop_float
4214  */
4215  __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error))
4216  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
4217  __Pyx_GOTREF(__pyx_t_2);
4218  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_LinearOperator_object_is_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
4219  __Pyx_GOTREF(__pyx_t_3);
4220  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4221 
4222  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":174
4223  *
4224  * if self.data_type_name != b'float32':
4225  * raise RuntimeError('Wrong accessors is called. The type of the ' + # <<<<<<<<<<<<<<
4226  * 'LinearOperator object is: %s'
4227  * % self.data_type_name)
4228  */
4229  __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __pyx_L1_error))
4230  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Wrong_accessors_is_called_The_ty, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
4231  __Pyx_GOTREF(__pyx_t_2);
4232  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4233  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error)
4234  __Pyx_GOTREF(__pyx_t_3);
4235  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4236  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4237  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4238  __PYX_ERR(0, 174, __pyx_L1_error)
4239 
4240  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":173
4241  * raise RuntimeError('Linear operator (float type) is not set.')
4242  *
4243  * if self.data_type_name != b'float32': # <<<<<<<<<<<<<<
4244  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4245  * 'LinearOperator object is: %s'
4246  */
4247  }
4248 
4249  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":178
4250  * % self.data_type_name)
4251  *
4252  * return self.Aop_float # <<<<<<<<<<<<<<
4253  *
4254  * # ==========================
4255  */
4256  __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error))
4257  __pyx_r = __pyx_v_self->Aop_float;
4258  goto __pyx_L0;
4259 
4260  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":166
4261  * # =========================
4262  *
4263  * cdef cLinearOperator[float]* get_linear_operator_float(self) except *: # <<<<<<<<<<<<<<
4264  * """
4265  * """
4266  */
4267 
4268  /* function exit code */
4269  __pyx_L1_error:;
4270  __Pyx_XDECREF(__pyx_t_2);
4271  __Pyx_XDECREF(__pyx_t_3);
4272  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_linear_operator_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
4273  __pyx_r = 0;
4274  __pyx_L0:;
4275  __Pyx_TraceReturn(Py_None, 0);
4276  __Pyx_RefNannyFinishContext();
4277  return __pyx_r;
4278 }
4279 
4280 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":184
4281  * # ==========================
4282  *
4283  * cdef cLinearOperator[double]* get_linear_operator_double(self) except *: # <<<<<<<<<<<<<<
4284  * """
4285  * """
4286  */
4287 
4288 static cLinearOperator<double> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_double(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
4289  cLinearOperator<double> *__pyx_r;
4290  __Pyx_TraceDeclarations
4291  __Pyx_RefNannyDeclarations
4292  int __pyx_t_1;
4293  PyObject *__pyx_t_2 = NULL;
4294  PyObject *__pyx_t_3 = NULL;
4295  int __pyx_lineno = 0;
4296  const char *__pyx_filename = NULL;
4297  int __pyx_clineno = 0;
4298  __Pyx_RefNannySetupContext("get_linear_operator_double", 0);
4299  __Pyx_TraceCall("get_linear_operator_double", __pyx_f[0], 184, 0, __PYX_ERR(0, 184, __pyx_L1_error));
4300 
4301  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":188
4302  * """
4303  *
4304  * if self.Aop_double == NULL: # <<<<<<<<<<<<<<
4305  * raise RuntimeError('Linear operator (double type) is not set.')
4306  *
4307  */
4308  __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error))
4309  __pyx_t_1 = ((__pyx_v_self->Aop_double == NULL) != 0);
4310  if (unlikely(__pyx_t_1)) {
4311 
4312  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":189
4313  *
4314  * if self.Aop_double == NULL:
4315  * raise RuntimeError('Linear operator (double type) is not set.') # <<<<<<<<<<<<<<
4316  *
4317  * if self.data_type_name != b'float64':
4318  */
4319  __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error))
4320  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
4321  __Pyx_GOTREF(__pyx_t_2);
4322  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4323  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4324  __PYX_ERR(0, 189, __pyx_L1_error)
4325 
4326  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":188
4327  * """
4328  *
4329  * if self.Aop_double == NULL: # <<<<<<<<<<<<<<
4330  * raise RuntimeError('Linear operator (double type) is not set.')
4331  *
4332  */
4333  }
4334 
4335  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":191
4336  * raise RuntimeError('Linear operator (double type) is not set.')
4337  *
4338  * if self.data_type_name != b'float64': # <<<<<<<<<<<<<<
4339  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4340  * 'LinearOperator object is: %s'
4341  */
4342  __Pyx_TraceLine(191,0,__PYX_ERR(0, 191, __pyx_L1_error))
4343  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
4344  __Pyx_GOTREF(__pyx_t_2);
4345  __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float64, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 191, __pyx_L1_error)
4346  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4347  if (unlikely(__pyx_t_1)) {
4348 
4349  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":194
4350  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4351  * 'LinearOperator object is: %s'
4352  * % self.data_type_name) # <<<<<<<<<<<<<<
4353  *
4354  * return self.Aop_double
4355  */
4356  __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error))
4357  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
4358  __Pyx_GOTREF(__pyx_t_2);
4359  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_LinearOperator_object_is_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
4360  __Pyx_GOTREF(__pyx_t_3);
4361  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4362 
4363  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":192
4364  *
4365  * if self.data_type_name != b'float64':
4366  * raise RuntimeError('Wrong accessors is called. The type of the ' + # <<<<<<<<<<<<<<
4367  * 'LinearOperator object is: %s'
4368  * % self.data_type_name)
4369  */
4370  __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __pyx_L1_error))
4371  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Wrong_accessors_is_called_The_ty, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
4372  __Pyx_GOTREF(__pyx_t_2);
4373  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4374  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
4375  __Pyx_GOTREF(__pyx_t_3);
4376  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4377  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4378  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4379  __PYX_ERR(0, 192, __pyx_L1_error)
4380 
4381  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":191
4382  * raise RuntimeError('Linear operator (double type) is not set.')
4383  *
4384  * if self.data_type_name != b'float64': # <<<<<<<<<<<<<<
4385  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4386  * 'LinearOperator object is: %s'
4387  */
4388  }
4389 
4390  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":196
4391  * % self.data_type_name)
4392  *
4393  * return self.Aop_double # <<<<<<<<<<<<<<
4394  *
4395  * # ===============================
4396  */
4397  __Pyx_TraceLine(196,0,__PYX_ERR(0, 196, __pyx_L1_error))
4398  __pyx_r = __pyx_v_self->Aop_double;
4399  goto __pyx_L0;
4400 
4401  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":184
4402  * # ==========================
4403  *
4404  * cdef cLinearOperator[double]* get_linear_operator_double(self) except *: # <<<<<<<<<<<<<<
4405  * """
4406  * """
4407  */
4408 
4409  /* function exit code */
4410  __pyx_L1_error:;
4411  __Pyx_XDECREF(__pyx_t_2);
4412  __Pyx_XDECREF(__pyx_t_3);
4413  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_linear_operator_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
4414  __pyx_r = 0;
4415  __pyx_L0:;
4416  __Pyx_TraceReturn(Py_None, 0);
4417  __Pyx_RefNannyFinishContext();
4418  return __pyx_r;
4419 }
4420 
4421 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":202
4422  * # ===============================
4423  *
4424  * cdef cLinearOperator[long double]* get_linear_operator_long_double( # <<<<<<<<<<<<<<
4425  * self) except*:
4426  * """
4427  */
4428 
4429 static cLinearOperator<long double> *__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_long_double(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
4431  __Pyx_TraceDeclarations
4432  __Pyx_RefNannyDeclarations
4433  int __pyx_t_1;
4434  PyObject *__pyx_t_2 = NULL;
4435  PyObject *__pyx_t_3 = NULL;
4436  int __pyx_lineno = 0;
4437  const char *__pyx_filename = NULL;
4438  int __pyx_clineno = 0;
4439  __Pyx_RefNannySetupContext("get_linear_operator_long_double", 0);
4440  __Pyx_TraceCall("get_linear_operator_long_double", __pyx_f[0], 202, 0, __PYX_ERR(0, 202, __pyx_L1_error));
4441 
4442  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":207
4443  * """
4444  *
4445  * if self.Aop_long_double == NULL: # <<<<<<<<<<<<<<
4446  * raise RuntimeError('Linear operator (long double type) is not ' +
4447  * 'set.')
4448  */
4449  __Pyx_TraceLine(207,0,__PYX_ERR(0, 207, __pyx_L1_error))
4450  __pyx_t_1 = ((__pyx_v_self->Aop_long_double == NULL) != 0);
4451  if (unlikely(__pyx_t_1)) {
4452 
4453  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":208
4454  *
4455  * if self.Aop_long_double == NULL:
4456  * raise RuntimeError('Linear operator (long double type) is not ' + # <<<<<<<<<<<<<<
4457  * 'set.')
4458  *
4459  */
4460  __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __pyx_L1_error))
4461  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
4462  __Pyx_GOTREF(__pyx_t_2);
4463  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
4464  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4465  __PYX_ERR(0, 208, __pyx_L1_error)
4466 
4467  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":207
4468  * """
4469  *
4470  * if self.Aop_long_double == NULL: # <<<<<<<<<<<<<<
4471  * raise RuntimeError('Linear operator (long double type) is not ' +
4472  * 'set.')
4473  */
4474  }
4475 
4476  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":211
4477  * 'set.')
4478  *
4479  * if self.data_type_name != b'float128': # <<<<<<<<<<<<<<
4480  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4481  * 'LinearOperator object is: %s'
4482  */
4483  __Pyx_TraceLine(211,0,__PYX_ERR(0, 211, __pyx_L1_error))
4484  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
4485  __Pyx_GOTREF(__pyx_t_2);
4486  __pyx_t_1 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_n_b_float128, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 211, __pyx_L1_error)
4487  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4488  if (unlikely(__pyx_t_1)) {
4489 
4490  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":214
4491  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4492  * 'LinearOperator object is: %s'
4493  * % self.data_type_name) # <<<<<<<<<<<<<<
4494  *
4495  * return self.Aop_long_double
4496  */
4497  __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __pyx_L1_error))
4498  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->data_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
4499  __Pyx_GOTREF(__pyx_t_2);
4500  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_LinearOperator_object_is_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error)
4501  __Pyx_GOTREF(__pyx_t_3);
4502  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4503 
4504  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":212
4505  *
4506  * if self.data_type_name != b'float128':
4507  * raise RuntimeError('Wrong accessors is called. The type of the ' + # <<<<<<<<<<<<<<
4508  * 'LinearOperator object is: %s'
4509  * % self.data_type_name)
4510  */
4511  __Pyx_TraceLine(212,0,__PYX_ERR(0, 212, __pyx_L1_error))
4512  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Wrong_accessors_is_called_The_ty, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
4513  __Pyx_GOTREF(__pyx_t_2);
4514  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4515  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error)
4516  __Pyx_GOTREF(__pyx_t_3);
4517  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4518  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4519  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4520  __PYX_ERR(0, 212, __pyx_L1_error)
4521 
4522  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":211
4523  * 'set.')
4524  *
4525  * if self.data_type_name != b'float128': # <<<<<<<<<<<<<<
4526  * raise RuntimeError('Wrong accessors is called. The type of the ' +
4527  * 'LinearOperator object is: %s'
4528  */
4529  }
4530 
4531  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":216
4532  * % self.data_type_name)
4533  *
4534  * return self.Aop_long_double # <<<<<<<<<<<<<<
4535  *
4536  * # ==============
4537  */
4538  __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error))
4539  __pyx_r = __pyx_v_self->Aop_long_double;
4540  goto __pyx_L0;
4541 
4542  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":202
4543  * # ===============================
4544  *
4545  * cdef cLinearOperator[long double]* get_linear_operator_long_double( # <<<<<<<<<<<<<<
4546  * self) except*:
4547  * """
4548  */
4549 
4550  /* function exit code */
4551  __pyx_L1_error:;
4552  __Pyx_XDECREF(__pyx_t_2);
4553  __Pyx_XDECREF(__pyx_t_3);
4554  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.get_linear_operator_long_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
4555  __pyx_r = 0;
4556  __pyx_L0:;
4557  __Pyx_TraceReturn(Py_None, 0);
4558  __Pyx_RefNannyFinishContext();
4559  return __pyx_r;
4560 }
4561 
4562 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":222
4563  * # ==============
4564  *
4565  * def set_parameters(self, parameters_): # <<<<<<<<<<<<<<
4566  * """
4567  * This function is only used for the test unit of this class. For the
4568  */
4569 
4570 /* Python wrapper */
4571 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters(PyObject *__pyx_v_self, PyObject *__pyx_v_parameters_); /*proto*/
4572 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters[] = "pycLinearOperator.set_parameters(self, parameters_)\n\n This function is only used for the test unit of this class. For the\n actual computations, the parameters are set though ``cLinearOperator``\n object directly, but not by this function.\n ";
4573 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters = {"set_parameters", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters, METH_O, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters};
4574 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters(PyObject *__pyx_v_self, PyObject *__pyx_v_parameters_) {
4575  PyObject *__pyx_r = 0;
4576  __Pyx_RefNannyDeclarations
4577  __Pyx_RefNannySetupContext("set_parameters (wrapper)", 0);
4578  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self), ((PyObject *)__pyx_v_parameters_));
4579 
4580  /* function exit code */
4581  __Pyx_RefNannyFinishContext();
4582  return __pyx_r;
4583 }
4584 
4585 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_parameters_) {
4586  PyObject *__pyx_r = NULL;
4587  __Pyx_TraceDeclarations
4588  __Pyx_RefNannyDeclarations
4589  PyObject *__pyx_t_1 = NULL;
4590  PyObject *__pyx_t_2 = NULL;
4591  PyObject *__pyx_t_3 = NULL;
4592  int __pyx_t_4;
4593  PyObject *__pyx_t_5 = NULL;
4594  int __pyx_lineno = 0;
4595  const char *__pyx_filename = NULL;
4596  int __pyx_clineno = 0;
4597  __Pyx_TraceFrameInit(__pyx_codeobj__9)
4598  __Pyx_RefNannySetupContext("set_parameters", 0);
4599  __Pyx_TraceCall("set_parameters", __pyx_f[0], 222, 0, __PYX_ERR(0, 222, __pyx_L1_error));
4600 
4601  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":229
4602  * """
4603  *
4604  * if numpy.isscalar(parameters_): # <<<<<<<<<<<<<<
4605  * self.parameters = numpy.array([parameters_], dtype=float)
4606  * else:
4607  */
4608  __Pyx_TraceLine(229,0,__PYX_ERR(0, 229, __pyx_L1_error))
4609  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
4610  __Pyx_GOTREF(__pyx_t_2);
4611  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isscalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
4612  __Pyx_GOTREF(__pyx_t_3);
4613  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4614  __pyx_t_2 = NULL;
4615  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4616  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4617  if (likely(__pyx_t_2)) {
4618  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4619  __Pyx_INCREF(__pyx_t_2);
4620  __Pyx_INCREF(function);
4621  __Pyx_DECREF_SET(__pyx_t_3, function);
4622  }
4623  }
4624  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_parameters_) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_parameters_);
4625  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4626  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
4627  __Pyx_GOTREF(__pyx_t_1);
4628  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4629  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 229, __pyx_L1_error)
4630  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4631  if (__pyx_t_4) {
4632 
4633  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":230
4634  *
4635  * if numpy.isscalar(parameters_):
4636  * self.parameters = numpy.array([parameters_], dtype=float) # <<<<<<<<<<<<<<
4637  * else:
4638  * self.parameters = parameters_
4639  */
4640  __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L1_error))
4641  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
4642  __Pyx_GOTREF(__pyx_t_1);
4643  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error)
4644  __Pyx_GOTREF(__pyx_t_3);
4645  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4646  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
4647  __Pyx_GOTREF(__pyx_t_1);
4648  __Pyx_INCREF(__pyx_v_parameters_);
4649  __Pyx_GIVEREF(__pyx_v_parameters_);
4650  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_parameters_);
4651  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
4652  __Pyx_GOTREF(__pyx_t_2);
4653  __Pyx_GIVEREF(__pyx_t_1);
4654  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4655  __pyx_t_1 = 0;
4656  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
4657  __Pyx_GOTREF(__pyx_t_1);
4658  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 230, __pyx_L1_error)
4659  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 230, __pyx_L1_error)
4660  __Pyx_GOTREF(__pyx_t_5);
4661  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4662  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4663  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4664  __Pyx_GIVEREF(__pyx_t_5);
4665  __Pyx_GOTREF(__pyx_v_self->parameters);
4666  __Pyx_DECREF(__pyx_v_self->parameters);
4667  __pyx_v_self->parameters = __pyx_t_5;
4668  __pyx_t_5 = 0;
4669 
4670  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":229
4671  * """
4672  *
4673  * if numpy.isscalar(parameters_): # <<<<<<<<<<<<<<
4674  * self.parameters = numpy.array([parameters_], dtype=float)
4675  * else:
4676  */
4677  goto __pyx_L3;
4678  }
4679 
4680  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":232
4681  * self.parameters = numpy.array([parameters_], dtype=float)
4682  * else:
4683  * self.parameters = parameters_ # <<<<<<<<<<<<<<
4684  *
4685  * # ===
4686  */
4687  __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error))
4688  /*else*/ {
4689  __Pyx_INCREF(__pyx_v_parameters_);
4690  __Pyx_GIVEREF(__pyx_v_parameters_);
4691  __Pyx_GOTREF(__pyx_v_self->parameters);
4692  __Pyx_DECREF(__pyx_v_self->parameters);
4693  __pyx_v_self->parameters = __pyx_v_parameters_;
4694  }
4695  __pyx_L3:;
4696 
4697  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":222
4698  * # ==============
4699  *
4700  * def set_parameters(self, parameters_): # <<<<<<<<<<<<<<
4701  * """
4702  * This function is only used for the test unit of this class. For the
4703  */
4704 
4705  /* function exit code */
4706  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4707  goto __pyx_L0;
4708  __pyx_L1_error:;
4709  __Pyx_XDECREF(__pyx_t_1);
4710  __Pyx_XDECREF(__pyx_t_2);
4711  __Pyx_XDECREF(__pyx_t_3);
4712  __Pyx_XDECREF(__pyx_t_5);
4713  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.set_parameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
4714  __pyx_r = NULL;
4715  __pyx_L0:;
4716  __Pyx_XGIVEREF(__pyx_r);
4717  __Pyx_TraceReturn(__pyx_r, 0);
4718  __Pyx_RefNannyFinishContext();
4719  return __pyx_r;
4720 }
4721 
4722 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":238
4723  * # ===
4724  *
4725  * cpdef void dot(self, vector, product) except *: # <<<<<<<<<<<<<<
4726  * """
4727  * """
4728  */
4729 
4730 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4731 static void __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product, int __pyx_skip_dispatch) {
4732  __Pyx_memviewslice __pyx_v_mv_vector_float = { 0, 0, { 0 }, { 0 }, { 0 } };
4733  __Pyx_memviewslice __pyx_v_mv_vector_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4734  __Pyx_memviewslice __pyx_v_mv_vector_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4735  __Pyx_memviewslice __pyx_v_mv_product_float = { 0, 0, { 0 }, { 0 }, { 0 } };
4736  __Pyx_memviewslice __pyx_v_mv_product_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4737  __Pyx_memviewslice __pyx_v_mv_product_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4738  __Pyx_memviewslice __pyx_v_mv_parameters_float = { 0, 0, { 0 }, { 0 }, { 0 } };
4739  __Pyx_memviewslice __pyx_v_mv_parameters_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4740  __Pyx_memviewslice __pyx_v_mv_parameters_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
4741  float *__pyx_v_c_vector_float;
4742  double *__pyx_v_c_vector_double;
4743  long double *__pyx_v_c_vector_long_double;
4744  float *__pyx_v_c_product_float;
4745  double *__pyx_v_c_product_double;
4746  long double *__pyx_v_c_product_long_double;
4747  float *__pyx_v_c_parameters_float;
4748  double *__pyx_v_c_parameters_double;
4749  long double *__pyx_v_c_parameters_long_double;
4750  __Pyx_TraceDeclarations
4751  __Pyx_RefNannyDeclarations
4752  PyObject *__pyx_t_1 = NULL;
4753  PyObject *__pyx_t_2 = NULL;
4754  PyObject *__pyx_t_3 = NULL;
4755  PyObject *__pyx_t_4 = NULL;
4756  int __pyx_t_5;
4757  PyObject *__pyx_t_6 = NULL;
4758  int __pyx_t_7;
4759  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
4760  Py_ssize_t __pyx_t_9;
4761  int __pyx_t_10;
4762  __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
4763  __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
4764  int __pyx_lineno = 0;
4765  const char *__pyx_filename = NULL;
4766  int __pyx_clineno = 0;
4767  __Pyx_TraceFrameInit(__pyx_codeobj__10)
4768  __Pyx_RefNannySetupContext("dot", 0);
4769  __Pyx_TraceCall("dot", __pyx_f[0], 238, 0, __PYX_ERR(0, 238, __pyx_L1_error));
4770  /* Check if called by wrapper */
4771  if (unlikely(__pyx_skip_dispatch)) ;
4772  /* Check if overridden in Python */
4773  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
4774  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
4775  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
4776  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
4777  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
4778  #endif
4779  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
4780  __Pyx_GOTREF(__pyx_t_1);
4781  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot)) {
4782  __Pyx_INCREF(__pyx_t_1);
4783  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
4784  __pyx_t_5 = 0;
4785  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4786  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4787  if (likely(__pyx_t_4)) {
4788  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4789  __Pyx_INCREF(__pyx_t_4);
4790  __Pyx_INCREF(function);
4791  __Pyx_DECREF_SET(__pyx_t_3, function);
4792  __pyx_t_5 = 1;
4793  }
4794  }
4795  #if CYTHON_FAST_PYCALL
4796  if (PyFunction_Check(__pyx_t_3)) {
4797  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_vector, __pyx_v_product};
4798  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
4799  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4800  __Pyx_GOTREF(__pyx_t_2);
4801  } else
4802  #endif
4803  #if CYTHON_FAST_PYCCALL
4804  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
4805  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_vector, __pyx_v_product};
4806  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
4807  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4808  __Pyx_GOTREF(__pyx_t_2);
4809  } else
4810  #endif
4811  {
4812  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error)
4813  __Pyx_GOTREF(__pyx_t_6);
4814  if (__pyx_t_4) {
4815  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
4816  }
4817  __Pyx_INCREF(__pyx_v_vector);
4818  __Pyx_GIVEREF(__pyx_v_vector);
4819  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_vector);
4820  __Pyx_INCREF(__pyx_v_product);
4821  __Pyx_GIVEREF(__pyx_v_product);
4822  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_product);
4823  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
4824  __Pyx_GOTREF(__pyx_t_2);
4825  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4826  }
4827  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4828  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4829  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4830  goto __pyx_L0;
4831  }
4832  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
4833  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
4834  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
4835  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
4836  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
4837  }
4838  #endif
4839  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4840  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
4841  }
4842  #endif
4843  }
4844 
4845  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":242
4846  * """
4847  *
4848  * if vector.dtype != product.dtype: # <<<<<<<<<<<<<<
4849  * raise TypeError('The input vector and product should have ')
4850  *
4851  */
4852  __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __pyx_L1_error))
4853  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
4854  __Pyx_GOTREF(__pyx_t_1);
4855  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_product, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
4856  __Pyx_GOTREF(__pyx_t_2);
4857  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
4858  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4859  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4860  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 242, __pyx_L1_error)
4861  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4862  if (unlikely(__pyx_t_7)) {
4863 
4864  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":243
4865  *
4866  * if vector.dtype != product.dtype:
4867  * raise TypeError('The input vector and product should have ') # <<<<<<<<<<<<<<
4868  *
4869  * # Declare memory views for input vector
4870  */
4871  __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error))
4872  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
4873  __Pyx_GOTREF(__pyx_t_3);
4874  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
4875  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4876  __PYX_ERR(0, 243, __pyx_L1_error)
4877 
4878  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":242
4879  * """
4880  *
4881  * if vector.dtype != product.dtype: # <<<<<<<<<<<<<<
4882  * raise TypeError('The input vector and product should have ')
4883  *
4884  */
4885  }
4886 
4887  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":276
4888  *
4889  * # Dispatch to single, double or quadro precision
4890  * if vector.dtype == 'float32': # <<<<<<<<<<<<<<
4891  *
4892  * # input vector
4893  */
4894  __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L1_error))
4895  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
4896  __Pyx_GOTREF(__pyx_t_3);
4897  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float32, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 276, __pyx_L1_error)
4898  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4899  if (__pyx_t_7) {
4900 
4901  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":279
4902  *
4903  * # input vector
4904  * mv_vector_float = vector # <<<<<<<<<<<<<<
4905  * c_vector_float = &mv_vector_float[0]
4906  *
4907  */
4908  __Pyx_TraceLine(279,0,__PYX_ERR(0, 279, __pyx_L1_error))
4909  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 279, __pyx_L1_error)
4910  __pyx_v_mv_vector_float = __pyx_t_8;
4911  __pyx_t_8.memview = NULL;
4912  __pyx_t_8.data = NULL;
4913 
4914  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":280
4915  * # input vector
4916  * mv_vector_float = vector
4917  * c_vector_float = &mv_vector_float[0] # <<<<<<<<<<<<<<
4918  *
4919  * # output product
4920  */
4921  __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L1_error))
4922  __pyx_t_9 = 0;
4923  __pyx_v_c_vector_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_vector_float.data + __pyx_t_9 * __pyx_v_mv_vector_float.strides[0]) ))));
4924 
4925  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":283
4926  *
4927  * # output product
4928  * mv_product_float = product # <<<<<<<<<<<<<<
4929  * c_product_float = &mv_product_float[0]
4930  *
4931  */
4932  __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L1_error))
4933  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 283, __pyx_L1_error)
4934  __pyx_v_mv_product_float = __pyx_t_8;
4935  __pyx_t_8.memview = NULL;
4936  __pyx_t_8.data = NULL;
4937 
4938  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":284
4939  * # output product
4940  * mv_product_float = product
4941  * c_product_float = &mv_product_float[0] # <<<<<<<<<<<<<<
4942  *
4943  * # Set parameters
4944  */
4945  __Pyx_TraceLine(284,0,__PYX_ERR(0, 284, __pyx_L1_error))
4946  __pyx_t_9 = 0;
4947  __pyx_v_c_product_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_product_float.data + __pyx_t_9 * __pyx_v_mv_product_float.strides[0]) ))));
4948 
4949  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":287
4950  *
4951  * # Set parameters
4952  * if self.parameters is not None: # <<<<<<<<<<<<<<
4953  * mv_parameters_float = self.parameters.astype('float32')
4954  * c_parameters_float = &mv_parameters_float[0]
4955  */
4956  __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __pyx_L1_error))
4957  __pyx_t_7 = (__pyx_v_self->parameters != Py_None);
4958  __pyx_t_10 = (__pyx_t_7 != 0);
4959  if (__pyx_t_10) {
4960 
4961  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":288
4962  * # Set parameters
4963  * if self.parameters is not None:
4964  * mv_parameters_float = self.parameters.astype('float32') # <<<<<<<<<<<<<<
4965  * c_parameters_float = &mv_parameters_float[0]
4966  * self.Aop_float.set_parameters(c_parameters_float)
4967  */
4968  __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L1_error))
4969  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error)
4970  __Pyx_GOTREF(__pyx_t_2);
4971  __pyx_t_1 = NULL;
4972  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4973  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
4974  if (likely(__pyx_t_1)) {
4975  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4976  __Pyx_INCREF(__pyx_t_1);
4977  __Pyx_INCREF(function);
4978  __Pyx_DECREF_SET(__pyx_t_2, function);
4979  }
4980  }
4981  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float32) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float32);
4982  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
4983  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
4984  __Pyx_GOTREF(__pyx_t_3);
4985  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4986  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 288, __pyx_L1_error)
4987  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4988  __pyx_v_mv_parameters_float = __pyx_t_8;
4989  __pyx_t_8.memview = NULL;
4990  __pyx_t_8.data = NULL;
4991 
4992  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":289
4993  * if self.parameters is not None:
4994  * mv_parameters_float = self.parameters.astype('float32')
4995  * c_parameters_float = &mv_parameters_float[0] # <<<<<<<<<<<<<<
4996  * self.Aop_float.set_parameters(c_parameters_float)
4997  *
4998  */
4999  __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L1_error))
5000  __pyx_t_9 = 0;
5001  __pyx_v_c_parameters_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_parameters_float.data + __pyx_t_9 * __pyx_v_mv_parameters_float.strides[0]) ))));
5002 
5003  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":290
5004  * mv_parameters_float = self.parameters.astype('float32')
5005  * c_parameters_float = &mv_parameters_float[0]
5006  * self.Aop_float.set_parameters(c_parameters_float) # <<<<<<<<<<<<<<
5007  *
5008  * # Call c object
5009  */
5010  __Pyx_TraceLine(290,0,__PYX_ERR(0, 290, __pyx_L1_error))
5011  __pyx_v_self->Aop_float->set_parameters(__pyx_v_c_parameters_float);
5012 
5013  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":287
5014  *
5015  * # Set parameters
5016  * if self.parameters is not None: # <<<<<<<<<<<<<<
5017  * mv_parameters_float = self.parameters.astype('float32')
5018  * c_parameters_float = &mv_parameters_float[0]
5019  */
5020  }
5021 
5022  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":293
5023  *
5024  * # Call c object
5025  * self.Aop_float.dot(c_vector_float, c_product_float) # <<<<<<<<<<<<<<
5026  *
5027  * elif vector.dtype == 'float64':
5028  */
5029  __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __pyx_L1_error))
5030  __pyx_v_self->Aop_float->dot(__pyx_v_c_vector_float, __pyx_v_c_product_float);
5031 
5032  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":276
5033  *
5034  * # Dispatch to single, double or quadro precision
5035  * if vector.dtype == 'float32': # <<<<<<<<<<<<<<
5036  *
5037  * # input vector
5038  */
5039  goto __pyx_L4;
5040  }
5041 
5042  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":295
5043  * self.Aop_float.dot(c_vector_float, c_product_float)
5044  *
5045  * elif vector.dtype == 'float64': # <<<<<<<<<<<<<<
5046  *
5047  * # input vector
5048  */
5049  __Pyx_TraceLine(295,0,__PYX_ERR(0, 295, __pyx_L1_error))
5050  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error)
5051  __Pyx_GOTREF(__pyx_t_3);
5052  __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float64, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 295, __pyx_L1_error)
5053  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5054  if (__pyx_t_10) {
5055 
5056  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":298
5057  *
5058  * # input vector
5059  * mv_vector_double = vector # <<<<<<<<<<<<<<
5060  * c_vector_double = &mv_vector_double[0]
5061  *
5062  */
5063  __Pyx_TraceLine(298,0,__PYX_ERR(0, 298, __pyx_L1_error))
5064  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 298, __pyx_L1_error)
5065  __pyx_v_mv_vector_double = __pyx_t_11;
5066  __pyx_t_11.memview = NULL;
5067  __pyx_t_11.data = NULL;
5068 
5069  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":299
5070  * # input vector
5071  * mv_vector_double = vector
5072  * c_vector_double = &mv_vector_double[0] # <<<<<<<<<<<<<<
5073  *
5074  * # output product
5075  */
5076  __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __pyx_L1_error))
5077  __pyx_t_9 = 0;
5078  __pyx_v_c_vector_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_vector_double.data + __pyx_t_9 * __pyx_v_mv_vector_double.strides[0]) ))));
5079 
5080  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":302
5081  *
5082  * # output product
5083  * mv_product_double = product # <<<<<<<<<<<<<<
5084  * c_product_double = &mv_product_double[0]
5085  *
5086  */
5087  __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error))
5088  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 302, __pyx_L1_error)
5089  __pyx_v_mv_product_double = __pyx_t_11;
5090  __pyx_t_11.memview = NULL;
5091  __pyx_t_11.data = NULL;
5092 
5093  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":303
5094  * # output product
5095  * mv_product_double = product
5096  * c_product_double = &mv_product_double[0] # <<<<<<<<<<<<<<
5097  *
5098  * # Set parameters
5099  */
5100  __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __pyx_L1_error))
5101  __pyx_t_9 = 0;
5102  __pyx_v_c_product_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_product_double.data + __pyx_t_9 * __pyx_v_mv_product_double.strides[0]) ))));
5103 
5104  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":306
5105  *
5106  * # Set parameters
5107  * if self.parameters is not None: # <<<<<<<<<<<<<<
5108  * mv_parameters_double = self.parameters.astype('float64')
5109  * c_parameters_double = &mv_parameters_double[0]
5110  */
5111  __Pyx_TraceLine(306,0,__PYX_ERR(0, 306, __pyx_L1_error))
5112  __pyx_t_10 = (__pyx_v_self->parameters != Py_None);
5113  __pyx_t_7 = (__pyx_t_10 != 0);
5114  if (__pyx_t_7) {
5115 
5116  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":307
5117  * # Set parameters
5118  * if self.parameters is not None:
5119  * mv_parameters_double = self.parameters.astype('float64') # <<<<<<<<<<<<<<
5120  * c_parameters_double = &mv_parameters_double[0]
5121  * self.Aop_double.set_parameters(c_parameters_double)
5122  */
5123  __Pyx_TraceLine(307,0,__PYX_ERR(0, 307, __pyx_L1_error))
5124  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
5125  __Pyx_GOTREF(__pyx_t_2);
5126  __pyx_t_1 = NULL;
5127  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5128  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
5129  if (likely(__pyx_t_1)) {
5130  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5131  __Pyx_INCREF(__pyx_t_1);
5132  __Pyx_INCREF(function);
5133  __Pyx_DECREF_SET(__pyx_t_2, function);
5134  }
5135  }
5136  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float64) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float64);
5137  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5138  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error)
5139  __Pyx_GOTREF(__pyx_t_3);
5140  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5141  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 307, __pyx_L1_error)
5142  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5143  __pyx_v_mv_parameters_double = __pyx_t_11;
5144  __pyx_t_11.memview = NULL;
5145  __pyx_t_11.data = NULL;
5146 
5147  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":308
5148  * if self.parameters is not None:
5149  * mv_parameters_double = self.parameters.astype('float64')
5150  * c_parameters_double = &mv_parameters_double[0] # <<<<<<<<<<<<<<
5151  * self.Aop_double.set_parameters(c_parameters_double)
5152  *
5153  */
5154  __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error))
5155  __pyx_t_9 = 0;
5156  __pyx_v_c_parameters_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_parameters_double.data + __pyx_t_9 * __pyx_v_mv_parameters_double.strides[0]) ))));
5157 
5158  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":309
5159  * mv_parameters_double = self.parameters.astype('float64')
5160  * c_parameters_double = &mv_parameters_double[0]
5161  * self.Aop_double.set_parameters(c_parameters_double) # <<<<<<<<<<<<<<
5162  *
5163  * # Call c object
5164  */
5165  __Pyx_TraceLine(309,0,__PYX_ERR(0, 309, __pyx_L1_error))
5166  __pyx_v_self->Aop_double->set_parameters(__pyx_v_c_parameters_double);
5167 
5168  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":306
5169  *
5170  * # Set parameters
5171  * if self.parameters is not None: # <<<<<<<<<<<<<<
5172  * mv_parameters_double = self.parameters.astype('float64')
5173  * c_parameters_double = &mv_parameters_double[0]
5174  */
5175  }
5176 
5177  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":312
5178  *
5179  * # Call c object
5180  * self.Aop_double.dot(c_vector_double, c_product_double) # <<<<<<<<<<<<<<
5181  *
5182  * elif vector.dtype == 'float128':
5183  */
5184  __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __pyx_L1_error))
5185  __pyx_v_self->Aop_double->dot(__pyx_v_c_vector_double, __pyx_v_c_product_double);
5186 
5187  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":295
5188  * self.Aop_float.dot(c_vector_float, c_product_float)
5189  *
5190  * elif vector.dtype == 'float64': # <<<<<<<<<<<<<<
5191  *
5192  * # input vector
5193  */
5194  goto __pyx_L4;
5195  }
5196 
5197  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":314
5198  * self.Aop_double.dot(c_vector_double, c_product_double)
5199  *
5200  * elif vector.dtype == 'float128': # <<<<<<<<<<<<<<
5201  *
5202  * # input vector
5203  */
5204  __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L1_error))
5205  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
5206  __Pyx_GOTREF(__pyx_t_3);
5207  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float128, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 314, __pyx_L1_error)
5208  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5209  if (likely(__pyx_t_7)) {
5210 
5211  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":317
5212  *
5213  * # input vector
5214  * mv_vector_long_double = vector # <<<<<<<<<<<<<<
5215  * c_vector_long_double = &mv_vector_long_double[0]
5216  *
5217  */
5218  __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error))
5219  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 317, __pyx_L1_error)
5220  __pyx_v_mv_vector_long_double = __pyx_t_12;
5221  __pyx_t_12.memview = NULL;
5222  __pyx_t_12.data = NULL;
5223 
5224  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":318
5225  * # input vector
5226  * mv_vector_long_double = vector
5227  * c_vector_long_double = &mv_vector_long_double[0] # <<<<<<<<<<<<<<
5228  *
5229  * # output product
5230  */
5231  __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __pyx_L1_error))
5232  __pyx_t_9 = 0;
5233  __pyx_v_c_vector_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_vector_long_double.data + __pyx_t_9 * __pyx_v_mv_vector_long_double.strides[0]) ))));
5234 
5235  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":321
5236  *
5237  * # output product
5238  * mv_product_long_double = product # <<<<<<<<<<<<<<
5239  * c_product_long_double = &mv_product_long_double[0]
5240  *
5241  */
5242  __Pyx_TraceLine(321,0,__PYX_ERR(0, 321, __pyx_L1_error))
5243  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 321, __pyx_L1_error)
5244  __pyx_v_mv_product_long_double = __pyx_t_12;
5245  __pyx_t_12.memview = NULL;
5246  __pyx_t_12.data = NULL;
5247 
5248  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":322
5249  * # output product
5250  * mv_product_long_double = product
5251  * c_product_long_double = &mv_product_long_double[0] # <<<<<<<<<<<<<<
5252  *
5253  * # Set parameters
5254  */
5255  __Pyx_TraceLine(322,0,__PYX_ERR(0, 322, __pyx_L1_error))
5256  __pyx_t_9 = 0;
5257  __pyx_v_c_product_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_product_long_double.data + __pyx_t_9 * __pyx_v_mv_product_long_double.strides[0]) ))));
5258 
5259  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":325
5260  *
5261  * # Set parameters
5262  * if self.parameters is not None: # <<<<<<<<<<<<<<
5263  * mv_parameters_long_double = self.parameters.astype('float128')
5264  * c_parameters_long_double = &mv_parameters_long_double[0]
5265  */
5266  __Pyx_TraceLine(325,0,__PYX_ERR(0, 325, __pyx_L1_error))
5267  __pyx_t_7 = (__pyx_v_self->parameters != Py_None);
5268  __pyx_t_10 = (__pyx_t_7 != 0);
5269  if (__pyx_t_10) {
5270 
5271  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":326
5272  * # Set parameters
5273  * if self.parameters is not None:
5274  * mv_parameters_long_double = self.parameters.astype('float128') # <<<<<<<<<<<<<<
5275  * c_parameters_long_double = &mv_parameters_long_double[0]
5276  * self.Aop_long_double.set_parameters(c_parameters_long_double)
5277  */
5278  __Pyx_TraceLine(326,0,__PYX_ERR(0, 326, __pyx_L1_error))
5279  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
5280  __Pyx_GOTREF(__pyx_t_2);
5281  __pyx_t_1 = NULL;
5282  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5283  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
5284  if (likely(__pyx_t_1)) {
5285  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5286  __Pyx_INCREF(__pyx_t_1);
5287  __Pyx_INCREF(function);
5288  __Pyx_DECREF_SET(__pyx_t_2, function);
5289  }
5290  }
5291  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float128) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float128);
5292  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5293  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error)
5294  __Pyx_GOTREF(__pyx_t_3);
5295  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5296  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 326, __pyx_L1_error)
5297  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5298  __pyx_v_mv_parameters_long_double = __pyx_t_12;
5299  __pyx_t_12.memview = NULL;
5300  __pyx_t_12.data = NULL;
5301 
5302  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":327
5303  * if self.parameters is not None:
5304  * mv_parameters_long_double = self.parameters.astype('float128')
5305  * c_parameters_long_double = &mv_parameters_long_double[0] # <<<<<<<<<<<<<<
5306  * self.Aop_long_double.set_parameters(c_parameters_long_double)
5307  *
5308  */
5309  __Pyx_TraceLine(327,0,__PYX_ERR(0, 327, __pyx_L1_error))
5310  __pyx_t_9 = 0;
5311  __pyx_v_c_parameters_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_parameters_long_double.data + __pyx_t_9 * __pyx_v_mv_parameters_long_double.strides[0]) ))));
5312 
5313  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":328
5314  * mv_parameters_long_double = self.parameters.astype('float128')
5315  * c_parameters_long_double = &mv_parameters_long_double[0]
5316  * self.Aop_long_double.set_parameters(c_parameters_long_double) # <<<<<<<<<<<<<<
5317  *
5318  * # Call c object
5319  */
5320  __Pyx_TraceLine(328,0,__PYX_ERR(0, 328, __pyx_L1_error))
5321  __pyx_v_self->Aop_long_double->set_parameters(__pyx_v_c_parameters_long_double);
5322 
5323  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":325
5324  *
5325  * # Set parameters
5326  * if self.parameters is not None: # <<<<<<<<<<<<<<
5327  * mv_parameters_long_double = self.parameters.astype('float128')
5328  * c_parameters_long_double = &mv_parameters_long_double[0]
5329  */
5330  }
5331 
5332  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":331
5333  *
5334  * # Call c object
5335  * self.Aop_long_double.dot(c_vector_long_double, # <<<<<<<<<<<<<<
5336  * c_product_long_double)
5337  *
5338  */
5339  __Pyx_TraceLine(331,0,__PYX_ERR(0, 331, __pyx_L1_error))
5340  __pyx_v_self->Aop_long_double->dot(__pyx_v_c_vector_long_double, __pyx_v_c_product_long_double);
5341 
5342  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":314
5343  * self.Aop_double.dot(c_vector_double, c_product_double)
5344  *
5345  * elif vector.dtype == 'float128': # <<<<<<<<<<<<<<
5346  *
5347  * # input vector
5348  */
5349  goto __pyx_L4;
5350  }
5351 
5352  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":335
5353  *
5354  * else:
5355  * raise TypeError('Vector type should be either "float32", ' + # <<<<<<<<<<<<<<
5356  * '"float64", or "float128".')
5357  *
5358  */
5359  __Pyx_TraceLine(335,0,__PYX_ERR(0, 335, __pyx_L1_error))
5360  /*else*/ {
5361  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error)
5362  __Pyx_GOTREF(__pyx_t_3);
5363  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5364  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5365  __PYX_ERR(0, 335, __pyx_L1_error)
5366  }
5367  __pyx_L4:;
5368 
5369  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":238
5370  * # ===
5371  *
5372  * cpdef void dot(self, vector, product) except *: # <<<<<<<<<<<<<<
5373  * """
5374  * """
5375  */
5376 
5377  /* function exit code */
5378  goto __pyx_L0;
5379  __pyx_L1_error:;
5380  __Pyx_XDECREF(__pyx_t_1);
5381  __Pyx_XDECREF(__pyx_t_2);
5382  __Pyx_XDECREF(__pyx_t_3);
5383  __Pyx_XDECREF(__pyx_t_4);
5384  __Pyx_XDECREF(__pyx_t_6);
5385  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
5386  __PYX_XDEC_MEMVIEW(&__pyx_t_11, 1);
5387  __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
5388  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
5389  __pyx_L0:;
5390  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_float, 1);
5391  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_double, 1);
5392  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_long_double, 1);
5393  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_float, 1);
5394  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_double, 1);
5395  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_long_double, 1);
5396  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_float, 1);
5397  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_double, 1);
5398  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_long_double, 1);
5399  __Pyx_TraceReturn(Py_None, 0);
5400  __Pyx_RefNannyFinishContext();
5401 }
5402 
5403 /* Python wrapper */
5404 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5405 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_10dot[] = "pycLinearOperator.dot(self, vector, product) -> void\n\n ";
5406 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot = {"dot", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_10dot};
5407 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5408  PyObject *__pyx_v_vector = 0;
5409  PyObject *__pyx_v_product = 0;
5410  int __pyx_lineno = 0;
5411  const char *__pyx_filename = NULL;
5412  int __pyx_clineno = 0;
5413  PyObject *__pyx_r = 0;
5414  __Pyx_RefNannyDeclarations
5415  __Pyx_RefNannySetupContext("dot (wrapper)", 0);
5416  {
5417  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vector,&__pyx_n_s_product,0};
5418  PyObject* values[2] = {0,0};
5419  if (unlikely(__pyx_kwds)) {
5420  Py_ssize_t kw_args;
5421  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5422  switch (pos_args) {
5423  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5424  CYTHON_FALLTHROUGH;
5425  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5426  CYTHON_FALLTHROUGH;
5427  case 0: break;
5428  default: goto __pyx_L5_argtuple_error;
5429  }
5430  kw_args = PyDict_Size(__pyx_kwds);
5431  switch (pos_args) {
5432  case 0:
5433  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vector)) != 0)) kw_args--;
5434  else goto __pyx_L5_argtuple_error;
5435  CYTHON_FALLTHROUGH;
5436  case 1:
5437  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_product)) != 0)) kw_args--;
5438  else {
5439  __Pyx_RaiseArgtupleInvalid("dot", 1, 2, 2, 1); __PYX_ERR(0, 238, __pyx_L3_error)
5440  }
5441  }
5442  if (unlikely(kw_args > 0)) {
5443  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dot") < 0)) __PYX_ERR(0, 238, __pyx_L3_error)
5444  }
5445  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5446  goto __pyx_L5_argtuple_error;
5447  } else {
5448  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5449  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5450  }
5451  __pyx_v_vector = values[0];
5452  __pyx_v_product = values[1];
5453  }
5454  goto __pyx_L4_argument_unpacking_done;
5455  __pyx_L5_argtuple_error:;
5456  __Pyx_RaiseArgtupleInvalid("dot", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 238, __pyx_L3_error)
5457  __pyx_L3_error:;
5458  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
5459  __Pyx_RefNannyFinishContext();
5460  return NULL;
5461  __pyx_L4_argument_unpacking_done:;
5462  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_10dot(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self), __pyx_v_vector, __pyx_v_product);
5463 
5464  /* function exit code */
5465  __Pyx_RefNannyFinishContext();
5466  return __pyx_r;
5467 }
5468 
5469 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_10dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product) {
5470  PyObject *__pyx_r = NULL;
5471  __Pyx_TraceDeclarations
5472  __Pyx_RefNannyDeclarations
5473  PyObject *__pyx_t_1 = NULL;
5474  int __pyx_lineno = 0;
5475  const char *__pyx_filename = NULL;
5476  int __pyx_clineno = 0;
5477  __Pyx_TraceFrameInit(__pyx_codeobj__10)
5478  __Pyx_RefNannySetupContext("dot", 0);
5479  __Pyx_TraceCall("dot (wrapper)", __pyx_f[0], 238, 0, __PYX_ERR(0, 238, __pyx_L1_error));
5480  __Pyx_XDECREF(__pyx_r);
5481  __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_dot(__pyx_v_self, __pyx_v_vector, __pyx_v_product, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 238, __pyx_L1_error)
5482  __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
5483  __Pyx_GOTREF(__pyx_t_1);
5484  __pyx_r = __pyx_t_1;
5485  __pyx_t_1 = 0;
5486  goto __pyx_L0;
5487 
5488  /* function exit code */
5489  __pyx_L1_error:;
5490  __Pyx_XDECREF(__pyx_t_1);
5491  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
5492  __pyx_r = NULL;
5493  __pyx_L0:;
5494  __Pyx_XGIVEREF(__pyx_r);
5495  __Pyx_TraceReturn(__pyx_r, 0);
5496  __Pyx_RefNannyFinishContext();
5497  return __pyx_r;
5498 }
5499 
5500 /* "imate/_c_linear_operator/py_c_linear_operator.pyx":342
5501  * # =============
5502  *
5503  * cpdef void transpose_dot(self, vector, product) except *: # <<<<<<<<<<<<<<
5504  * """
5505  * """
5506  */
5507 
5508 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5509 static void __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_transpose_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product, int __pyx_skip_dispatch) {
5510  __Pyx_memviewslice __pyx_v_mv_vector_float = { 0, 0, { 0 }, { 0 }, { 0 } };
5511  __Pyx_memviewslice __pyx_v_mv_vector_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5512  __Pyx_memviewslice __pyx_v_mv_vector_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5513  __Pyx_memviewslice __pyx_v_mv_product_float = { 0, 0, { 0 }, { 0 }, { 0 } };
5514  __Pyx_memviewslice __pyx_v_mv_product_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5515  __Pyx_memviewslice __pyx_v_mv_product_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5516  __Pyx_memviewslice __pyx_v_mv_parameters_float = { 0, 0, { 0 }, { 0 }, { 0 } };
5517  __Pyx_memviewslice __pyx_v_mv_parameters_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5518  __Pyx_memviewslice __pyx_v_mv_parameters_long_double = { 0, 0, { 0 }, { 0 }, { 0 } };
5519  float *__pyx_v_c_vector_float;
5520  double *__pyx_v_c_vector_double;
5521  long double *__pyx_v_c_vector_long_double;
5522  float *__pyx_v_c_product_float;
5523  double *__pyx_v_c_product_double;
5524  long double *__pyx_v_c_product_long_double;
5525  float *__pyx_v_c_parameters_float;
5526  double *__pyx_v_c_parameters_double;
5527  long double *__pyx_v_c_parameters_long_double;
5528  __Pyx_TraceDeclarations
5529  __Pyx_RefNannyDeclarations
5530  PyObject *__pyx_t_1 = NULL;
5531  PyObject *__pyx_t_2 = NULL;
5532  PyObject *__pyx_t_3 = NULL;
5533  PyObject *__pyx_t_4 = NULL;
5534  int __pyx_t_5;
5535  PyObject *__pyx_t_6 = NULL;
5536  int __pyx_t_7;
5537  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
5538  Py_ssize_t __pyx_t_9;
5539  int __pyx_t_10;
5540  __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
5541  __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
5542  int __pyx_lineno = 0;
5543  const char *__pyx_filename = NULL;
5544  int __pyx_clineno = 0;
5545  __Pyx_TraceFrameInit(__pyx_codeobj__13)
5546  __Pyx_RefNannySetupContext("transpose_dot", 0);
5547  __Pyx_TraceCall("transpose_dot", __pyx_f[0], 342, 0, __PYX_ERR(0, 342, __pyx_L1_error));
5548  /* Check if called by wrapper */
5549  if (unlikely(__pyx_skip_dispatch)) ;
5550  /* Check if overridden in Python */
5551  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
5552  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
5553  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
5554  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
5555  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
5556  #endif
5557  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_transpose_dot); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
5558  __Pyx_GOTREF(__pyx_t_1);
5559  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot)) {
5560  __Pyx_INCREF(__pyx_t_1);
5561  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
5562  __pyx_t_5 = 0;
5563  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5564  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5565  if (likely(__pyx_t_4)) {
5566  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5567  __Pyx_INCREF(__pyx_t_4);
5568  __Pyx_INCREF(function);
5569  __Pyx_DECREF_SET(__pyx_t_3, function);
5570  __pyx_t_5 = 1;
5571  }
5572  }
5573  #if CYTHON_FAST_PYCALL
5574  if (PyFunction_Check(__pyx_t_3)) {
5575  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_vector, __pyx_v_product};
5576  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
5577  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5578  __Pyx_GOTREF(__pyx_t_2);
5579  } else
5580  #endif
5581  #if CYTHON_FAST_PYCCALL
5582  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
5583  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_vector, __pyx_v_product};
5584  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
5585  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5586  __Pyx_GOTREF(__pyx_t_2);
5587  } else
5588  #endif
5589  {
5590  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
5591  __Pyx_GOTREF(__pyx_t_6);
5592  if (__pyx_t_4) {
5593  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
5594  }
5595  __Pyx_INCREF(__pyx_v_vector);
5596  __Pyx_GIVEREF(__pyx_v_vector);
5597  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_vector);
5598  __Pyx_INCREF(__pyx_v_product);
5599  __Pyx_GIVEREF(__pyx_v_product);
5600  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_product);
5601  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error)
5602  __Pyx_GOTREF(__pyx_t_2);
5603  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5604  }
5605  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5606  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5607  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5608  goto __pyx_L0;
5609  }
5610  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
5611  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
5612  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
5613  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
5614  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
5615  }
5616  #endif
5617  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5618  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
5619  }
5620  #endif
5621  }
5622 
5623  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":346
5624  * """
5625  *
5626  * if vector.dtype != product.dtype: # <<<<<<<<<<<<<<
5627  * raise TypeError('The input vector and product should have ')
5628  *
5629  */
5630  __Pyx_TraceLine(346,0,__PYX_ERR(0, 346, __pyx_L1_error))
5631  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
5632  __Pyx_GOTREF(__pyx_t_1);
5633  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_product, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error)
5634  __Pyx_GOTREF(__pyx_t_2);
5635  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error)
5636  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5637  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5638  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 346, __pyx_L1_error)
5639  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5640  if (unlikely(__pyx_t_7)) {
5641 
5642  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":347
5643  *
5644  * if vector.dtype != product.dtype:
5645  * raise TypeError('The input vector and product should have ') # <<<<<<<<<<<<<<
5646  *
5647  * # Declare memory views for input vector
5648  */
5649  __Pyx_TraceLine(347,0,__PYX_ERR(0, 347, __pyx_L1_error))
5650  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error)
5651  __Pyx_GOTREF(__pyx_t_3);
5652  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
5653  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5654  __PYX_ERR(0, 347, __pyx_L1_error)
5655 
5656  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":346
5657  * """
5658  *
5659  * if vector.dtype != product.dtype: # <<<<<<<<<<<<<<
5660  * raise TypeError('The input vector and product should have ')
5661  *
5662  */
5663  }
5664 
5665  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":380
5666  *
5667  * # Dispatch to single, double or quadro precision
5668  * if vector.dtype == 'float32': # <<<<<<<<<<<<<<
5669  *
5670  * # input vector
5671  */
5672  __Pyx_TraceLine(380,0,__PYX_ERR(0, 380, __pyx_L1_error))
5673  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
5674  __Pyx_GOTREF(__pyx_t_3);
5675  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float32, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 380, __pyx_L1_error)
5676  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5677  if (__pyx_t_7) {
5678 
5679  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":383
5680  *
5681  * # input vector
5682  * mv_vector_float = vector # <<<<<<<<<<<<<<
5683  * c_vector_float = &mv_vector_float[0]
5684  *
5685  */
5686  __Pyx_TraceLine(383,0,__PYX_ERR(0, 383, __pyx_L1_error))
5687  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 383, __pyx_L1_error)
5688  __pyx_v_mv_vector_float = __pyx_t_8;
5689  __pyx_t_8.memview = NULL;
5690  __pyx_t_8.data = NULL;
5691 
5692  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":384
5693  * # input vector
5694  * mv_vector_float = vector
5695  * c_vector_float = &mv_vector_float[0] # <<<<<<<<<<<<<<
5696  *
5697  * # output product
5698  */
5699  __Pyx_TraceLine(384,0,__PYX_ERR(0, 384, __pyx_L1_error))
5700  __pyx_t_9 = 0;
5701  __pyx_v_c_vector_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_vector_float.data + __pyx_t_9 * __pyx_v_mv_vector_float.strides[0]) ))));
5702 
5703  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":387
5704  *
5705  * # output product
5706  * mv_product_float = product # <<<<<<<<<<<<<<
5707  * c_product_float = &mv_product_float[0]
5708  *
5709  */
5710  __Pyx_TraceLine(387,0,__PYX_ERR(0, 387, __pyx_L1_error))
5711  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 387, __pyx_L1_error)
5712  __pyx_v_mv_product_float = __pyx_t_8;
5713  __pyx_t_8.memview = NULL;
5714  __pyx_t_8.data = NULL;
5715 
5716  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":388
5717  * # output product
5718  * mv_product_float = product
5719  * c_product_float = &mv_product_float[0] # <<<<<<<<<<<<<<
5720  *
5721  * # Set parameters
5722  */
5723  __Pyx_TraceLine(388,0,__PYX_ERR(0, 388, __pyx_L1_error))
5724  __pyx_t_9 = 0;
5725  __pyx_v_c_product_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_product_float.data + __pyx_t_9 * __pyx_v_mv_product_float.strides[0]) ))));
5726 
5727  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":391
5728  *
5729  * # Set parameters
5730  * if self.parameters is not None: # <<<<<<<<<<<<<<
5731  * mv_parameters_float = self.parameters.astype('float32')
5732  * c_parameters_float = &mv_parameters_float[0]
5733  */
5734  __Pyx_TraceLine(391,0,__PYX_ERR(0, 391, __pyx_L1_error))
5735  __pyx_t_7 = (__pyx_v_self->parameters != Py_None);
5736  __pyx_t_10 = (__pyx_t_7 != 0);
5737  if (__pyx_t_10) {
5738 
5739  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":392
5740  * # Set parameters
5741  * if self.parameters is not None:
5742  * mv_parameters_float = self.parameters.astype('float32') # <<<<<<<<<<<<<<
5743  * c_parameters_float = &mv_parameters_float[0]
5744  * self.Aop_float.set_parameters(c_parameters_float)
5745  */
5746  __Pyx_TraceLine(392,0,__PYX_ERR(0, 392, __pyx_L1_error))
5747  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
5748  __Pyx_GOTREF(__pyx_t_2);
5749  __pyx_t_1 = NULL;
5750  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5751  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
5752  if (likely(__pyx_t_1)) {
5753  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5754  __Pyx_INCREF(__pyx_t_1);
5755  __Pyx_INCREF(function);
5756  __Pyx_DECREF_SET(__pyx_t_2, function);
5757  }
5758  }
5759  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float32) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float32);
5760  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5761  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error)
5762  __Pyx_GOTREF(__pyx_t_3);
5763  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5764  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 392, __pyx_L1_error)
5765  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5766  __pyx_v_mv_parameters_float = __pyx_t_8;
5767  __pyx_t_8.memview = NULL;
5768  __pyx_t_8.data = NULL;
5769 
5770  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":393
5771  * if self.parameters is not None:
5772  * mv_parameters_float = self.parameters.astype('float32')
5773  * c_parameters_float = &mv_parameters_float[0] # <<<<<<<<<<<<<<
5774  * self.Aop_float.set_parameters(c_parameters_float)
5775  *
5776  */
5777  __Pyx_TraceLine(393,0,__PYX_ERR(0, 393, __pyx_L1_error))
5778  __pyx_t_9 = 0;
5779  __pyx_v_c_parameters_float = (&(*((float *) ( /* dim=0 */ (__pyx_v_mv_parameters_float.data + __pyx_t_9 * __pyx_v_mv_parameters_float.strides[0]) ))));
5780 
5781  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":394
5782  * mv_parameters_float = self.parameters.astype('float32')
5783  * c_parameters_float = &mv_parameters_float[0]
5784  * self.Aop_float.set_parameters(c_parameters_float) # <<<<<<<<<<<<<<
5785  *
5786  * # Call c object
5787  */
5788  __Pyx_TraceLine(394,0,__PYX_ERR(0, 394, __pyx_L1_error))
5789  __pyx_v_self->Aop_float->set_parameters(__pyx_v_c_parameters_float);
5790 
5791  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":391
5792  *
5793  * # Set parameters
5794  * if self.parameters is not None: # <<<<<<<<<<<<<<
5795  * mv_parameters_float = self.parameters.astype('float32')
5796  * c_parameters_float = &mv_parameters_float[0]
5797  */
5798  }
5799 
5800  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":397
5801  *
5802  * # Call c object
5803  * self.Aop_float.transpose_dot(c_vector_float, c_product_float) # <<<<<<<<<<<<<<
5804  *
5805  * elif vector.dtype == 'float64':
5806  */
5807  __Pyx_TraceLine(397,0,__PYX_ERR(0, 397, __pyx_L1_error))
5808  __pyx_v_self->Aop_float->transpose_dot(__pyx_v_c_vector_float, __pyx_v_c_product_float);
5809 
5810  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":380
5811  *
5812  * # Dispatch to single, double or quadro precision
5813  * if vector.dtype == 'float32': # <<<<<<<<<<<<<<
5814  *
5815  * # input vector
5816  */
5817  goto __pyx_L4;
5818  }
5819 
5820  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":399
5821  * self.Aop_float.transpose_dot(c_vector_float, c_product_float)
5822  *
5823  * elif vector.dtype == 'float64': # <<<<<<<<<<<<<<
5824  *
5825  * # input vector
5826  */
5827  __Pyx_TraceLine(399,0,__PYX_ERR(0, 399, __pyx_L1_error))
5828  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error)
5829  __Pyx_GOTREF(__pyx_t_3);
5830  __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float64, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 399, __pyx_L1_error)
5831  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5832  if (__pyx_t_10) {
5833 
5834  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":402
5835  *
5836  * # input vector
5837  * mv_vector_double = vector # <<<<<<<<<<<<<<
5838  * c_vector_double = &mv_vector_double[0]
5839  *
5840  */
5841  __Pyx_TraceLine(402,0,__PYX_ERR(0, 402, __pyx_L1_error))
5842  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 402, __pyx_L1_error)
5843  __pyx_v_mv_vector_double = __pyx_t_11;
5844  __pyx_t_11.memview = NULL;
5845  __pyx_t_11.data = NULL;
5846 
5847  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":403
5848  * # input vector
5849  * mv_vector_double = vector
5850  * c_vector_double = &mv_vector_double[0] # <<<<<<<<<<<<<<
5851  *
5852  * # output product
5853  */
5854  __Pyx_TraceLine(403,0,__PYX_ERR(0, 403, __pyx_L1_error))
5855  __pyx_t_9 = 0;
5856  __pyx_v_c_vector_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_vector_double.data + __pyx_t_9 * __pyx_v_mv_vector_double.strides[0]) ))));
5857 
5858  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":406
5859  *
5860  * # output product
5861  * mv_product_double = product # <<<<<<<<<<<<<<
5862  * c_product_double = &mv_product_double[0]
5863  *
5864  */
5865  __Pyx_TraceLine(406,0,__PYX_ERR(0, 406, __pyx_L1_error))
5866  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 406, __pyx_L1_error)
5867  __pyx_v_mv_product_double = __pyx_t_11;
5868  __pyx_t_11.memview = NULL;
5869  __pyx_t_11.data = NULL;
5870 
5871  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":407
5872  * # output product
5873  * mv_product_double = product
5874  * c_product_double = &mv_product_double[0] # <<<<<<<<<<<<<<
5875  *
5876  * # Set parameters
5877  */
5878  __Pyx_TraceLine(407,0,__PYX_ERR(0, 407, __pyx_L1_error))
5879  __pyx_t_9 = 0;
5880  __pyx_v_c_product_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_product_double.data + __pyx_t_9 * __pyx_v_mv_product_double.strides[0]) ))));
5881 
5882  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":410
5883  *
5884  * # Set parameters
5885  * if self.parameters is not None: # <<<<<<<<<<<<<<
5886  * mv_parameters_double = self.parameters.astype('float64')
5887  * c_parameters_double = &mv_parameters_double[0]
5888  */
5889  __Pyx_TraceLine(410,0,__PYX_ERR(0, 410, __pyx_L1_error))
5890  __pyx_t_10 = (__pyx_v_self->parameters != Py_None);
5891  __pyx_t_7 = (__pyx_t_10 != 0);
5892  if (__pyx_t_7) {
5893 
5894  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":411
5895  * # Set parameters
5896  * if self.parameters is not None:
5897  * mv_parameters_double = self.parameters.astype('float64') # <<<<<<<<<<<<<<
5898  * c_parameters_double = &mv_parameters_double[0]
5899  * self.Aop_double.set_parameters(c_parameters_double)
5900  */
5901  __Pyx_TraceLine(411,0,__PYX_ERR(0, 411, __pyx_L1_error))
5902  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
5903  __Pyx_GOTREF(__pyx_t_2);
5904  __pyx_t_1 = NULL;
5905  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5906  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
5907  if (likely(__pyx_t_1)) {
5908  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5909  __Pyx_INCREF(__pyx_t_1);
5910  __Pyx_INCREF(function);
5911  __Pyx_DECREF_SET(__pyx_t_2, function);
5912  }
5913  }
5914  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float64) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float64);
5915  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
5916  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error)
5917  __Pyx_GOTREF(__pyx_t_3);
5918  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5919  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 411, __pyx_L1_error)
5920  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5921  __pyx_v_mv_parameters_double = __pyx_t_11;
5922  __pyx_t_11.memview = NULL;
5923  __pyx_t_11.data = NULL;
5924 
5925  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":412
5926  * if self.parameters is not None:
5927  * mv_parameters_double = self.parameters.astype('float64')
5928  * c_parameters_double = &mv_parameters_double[0] # <<<<<<<<<<<<<<
5929  * self.Aop_double.set_parameters(c_parameters_double)
5930  *
5931  */
5932  __Pyx_TraceLine(412,0,__PYX_ERR(0, 412, __pyx_L1_error))
5933  __pyx_t_9 = 0;
5934  __pyx_v_c_parameters_double = (&(*((double *) ( /* dim=0 */ (__pyx_v_mv_parameters_double.data + __pyx_t_9 * __pyx_v_mv_parameters_double.strides[0]) ))));
5935 
5936  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":413
5937  * mv_parameters_double = self.parameters.astype('float64')
5938  * c_parameters_double = &mv_parameters_double[0]
5939  * self.Aop_double.set_parameters(c_parameters_double) # <<<<<<<<<<<<<<
5940  *
5941  * # Call c object
5942  */
5943  __Pyx_TraceLine(413,0,__PYX_ERR(0, 413, __pyx_L1_error))
5944  __pyx_v_self->Aop_double->set_parameters(__pyx_v_c_parameters_double);
5945 
5946  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":410
5947  *
5948  * # Set parameters
5949  * if self.parameters is not None: # <<<<<<<<<<<<<<
5950  * mv_parameters_double = self.parameters.astype('float64')
5951  * c_parameters_double = &mv_parameters_double[0]
5952  */
5953  }
5954 
5955  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":416
5956  *
5957  * # Call c object
5958  * self.Aop_double.transpose_dot(c_vector_double, c_product_double) # <<<<<<<<<<<<<<
5959  *
5960  * elif vector.dtype == 'float128':
5961  */
5962  __Pyx_TraceLine(416,0,__PYX_ERR(0, 416, __pyx_L1_error))
5963  __pyx_v_self->Aop_double->transpose_dot(__pyx_v_c_vector_double, __pyx_v_c_product_double);
5964 
5965  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":399
5966  * self.Aop_float.transpose_dot(c_vector_float, c_product_float)
5967  *
5968  * elif vector.dtype == 'float64': # <<<<<<<<<<<<<<
5969  *
5970  * # input vector
5971  */
5972  goto __pyx_L4;
5973  }
5974 
5975  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":418
5976  * self.Aop_double.transpose_dot(c_vector_double, c_product_double)
5977  *
5978  * elif vector.dtype == 'float128': # <<<<<<<<<<<<<<
5979  *
5980  * # input vector
5981  */
5982  __Pyx_TraceLine(418,0,__PYX_ERR(0, 418, __pyx_L1_error))
5983  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_vector, __pyx_n_s_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error)
5984  __Pyx_GOTREF(__pyx_t_3);
5985  __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_float128, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 418, __pyx_L1_error)
5986  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5987  if (likely(__pyx_t_7)) {
5988 
5989  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":421
5990  *
5991  * # input vector
5992  * mv_vector_long_double = vector # <<<<<<<<<<<<<<
5993  * c_vector_long_double = &mv_vector_long_double[0]
5994  *
5995  */
5996  __Pyx_TraceLine(421,0,__PYX_ERR(0, 421, __pyx_L1_error))
5997  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_v_vector, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 421, __pyx_L1_error)
5998  __pyx_v_mv_vector_long_double = __pyx_t_12;
5999  __pyx_t_12.memview = NULL;
6000  __pyx_t_12.data = NULL;
6001 
6002  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":422
6003  * # input vector
6004  * mv_vector_long_double = vector
6005  * c_vector_long_double = &mv_vector_long_double[0] # <<<<<<<<<<<<<<
6006  *
6007  * # output product
6008  */
6009  __Pyx_TraceLine(422,0,__PYX_ERR(0, 422, __pyx_L1_error))
6010  __pyx_t_9 = 0;
6011  __pyx_v_c_vector_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_vector_long_double.data + __pyx_t_9 * __pyx_v_mv_vector_long_double.strides[0]) ))));
6012 
6013  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":425
6014  *
6015  * # output product
6016  * mv_product_long_double = product # <<<<<<<<<<<<<<
6017  * c_product_long_double = &mv_product_long_double[0]
6018  *
6019  */
6020  __Pyx_TraceLine(425,0,__PYX_ERR(0, 425, __pyx_L1_error))
6021  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_v_product, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 425, __pyx_L1_error)
6022  __pyx_v_mv_product_long_double = __pyx_t_12;
6023  __pyx_t_12.memview = NULL;
6024  __pyx_t_12.data = NULL;
6025 
6026  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":426
6027  * # output product
6028  * mv_product_long_double = product
6029  * c_product_long_double = &mv_product_long_double[0] # <<<<<<<<<<<<<<
6030  *
6031  * # Set parameters
6032  */
6033  __Pyx_TraceLine(426,0,__PYX_ERR(0, 426, __pyx_L1_error))
6034  __pyx_t_9 = 0;
6035  __pyx_v_c_product_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_product_long_double.data + __pyx_t_9 * __pyx_v_mv_product_long_double.strides[0]) ))));
6036 
6037  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":429
6038  *
6039  * # Set parameters
6040  * if self.parameters is not None: # <<<<<<<<<<<<<<
6041  * mv_parameters_long_double = self.parameters.astype('float128')
6042  * c_parameters_long_double = &mv_parameters_long_double[0]
6043  */
6044  __Pyx_TraceLine(429,0,__PYX_ERR(0, 429, __pyx_L1_error))
6045  __pyx_t_7 = (__pyx_v_self->parameters != Py_None);
6046  __pyx_t_10 = (__pyx_t_7 != 0);
6047  if (__pyx_t_10) {
6048 
6049  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":430
6050  * # Set parameters
6051  * if self.parameters is not None:
6052  * mv_parameters_long_double = self.parameters.astype('float128') # <<<<<<<<<<<<<<
6053  * c_parameters_long_double = &mv_parameters_long_double[0]
6054  * self.Aop_long_double.set_parameters(c_parameters_long_double)
6055  */
6056  __Pyx_TraceLine(430,0,__PYX_ERR(0, 430, __pyx_L1_error))
6057  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->parameters, __pyx_n_s_astype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error)
6058  __Pyx_GOTREF(__pyx_t_2);
6059  __pyx_t_1 = NULL;
6060  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
6061  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
6062  if (likely(__pyx_t_1)) {
6063  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
6064  __Pyx_INCREF(__pyx_t_1);
6065  __Pyx_INCREF(function);
6066  __Pyx_DECREF_SET(__pyx_t_2, function);
6067  }
6068  }
6069  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_n_u_float128) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_float128);
6070  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
6071  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error)
6072  __Pyx_GOTREF(__pyx_t_3);
6073  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6074  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 430, __pyx_L1_error)
6075  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6076  __pyx_v_mv_parameters_long_double = __pyx_t_12;
6077  __pyx_t_12.memview = NULL;
6078  __pyx_t_12.data = NULL;
6079 
6080  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":431
6081  * if self.parameters is not None:
6082  * mv_parameters_long_double = self.parameters.astype('float128')
6083  * c_parameters_long_double = &mv_parameters_long_double[0] # <<<<<<<<<<<<<<
6084  * self.Aop_long_double.set_parameters(c_parameters_long_double)
6085  *
6086  */
6087  __Pyx_TraceLine(431,0,__PYX_ERR(0, 431, __pyx_L1_error))
6088  __pyx_t_9 = 0;
6089  __pyx_v_c_parameters_long_double = (&(*((long double *) ( /* dim=0 */ (__pyx_v_mv_parameters_long_double.data + __pyx_t_9 * __pyx_v_mv_parameters_long_double.strides[0]) ))));
6090 
6091  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":432
6092  * mv_parameters_long_double = self.parameters.astype('float128')
6093  * c_parameters_long_double = &mv_parameters_long_double[0]
6094  * self.Aop_long_double.set_parameters(c_parameters_long_double) # <<<<<<<<<<<<<<
6095  *
6096  * # Call c object
6097  */
6098  __Pyx_TraceLine(432,0,__PYX_ERR(0, 432, __pyx_L1_error))
6099  __pyx_v_self->Aop_long_double->set_parameters(__pyx_v_c_parameters_long_double);
6100 
6101  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":429
6102  *
6103  * # Set parameters
6104  * if self.parameters is not None: # <<<<<<<<<<<<<<
6105  * mv_parameters_long_double = self.parameters.astype('float128')
6106  * c_parameters_long_double = &mv_parameters_long_double[0]
6107  */
6108  }
6109 
6110  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":435
6111  *
6112  * # Call c object
6113  * self.Aop_long_double.transpose_dot(c_vector_long_double, # <<<<<<<<<<<<<<
6114  * c_product_long_double)
6115  *
6116  */
6117  __Pyx_TraceLine(435,0,__PYX_ERR(0, 435, __pyx_L1_error))
6118  __pyx_v_self->Aop_long_double->transpose_dot(__pyx_v_c_vector_long_double, __pyx_v_c_product_long_double);
6119 
6120  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":418
6121  * self.Aop_double.transpose_dot(c_vector_double, c_product_double)
6122  *
6123  * elif vector.dtype == 'float128': # <<<<<<<<<<<<<<
6124  *
6125  * # input vector
6126  */
6127  goto __pyx_L4;
6128  }
6129 
6130  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":439
6131  *
6132  * else:
6133  * raise TypeError('Vector type should be either "float32", ' + # <<<<<<<<<<<<<<
6134  * '"float64", or "float128".')
6135  */
6136  __Pyx_TraceLine(439,0,__PYX_ERR(0, 439, __pyx_L1_error))
6137  /*else*/ {
6138  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error)
6139  __Pyx_GOTREF(__pyx_t_3);
6140  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6141  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6142  __PYX_ERR(0, 439, __pyx_L1_error)
6143  }
6144  __pyx_L4:;
6145 
6146  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":342
6147  * # =============
6148  *
6149  * cpdef void transpose_dot(self, vector, product) except *: # <<<<<<<<<<<<<<
6150  * """
6151  * """
6152  */
6153 
6154  /* function exit code */
6155  goto __pyx_L0;
6156  __pyx_L1_error:;
6157  __Pyx_XDECREF(__pyx_t_1);
6158  __Pyx_XDECREF(__pyx_t_2);
6159  __Pyx_XDECREF(__pyx_t_3);
6160  __Pyx_XDECREF(__pyx_t_4);
6161  __Pyx_XDECREF(__pyx_t_6);
6162  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
6163  __PYX_XDEC_MEMVIEW(&__pyx_t_11, 1);
6164  __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
6165  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.transpose_dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
6166  __pyx_L0:;
6167  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_float, 1);
6168  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_double, 1);
6169  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_vector_long_double, 1);
6170  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_float, 1);
6171  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_double, 1);
6172  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_product_long_double, 1);
6173  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_float, 1);
6174  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_double, 1);
6175  __PYX_XDEC_MEMVIEW(&__pyx_v_mv_parameters_long_double, 1);
6176  __Pyx_TraceReturn(Py_None, 0);
6177  __Pyx_RefNannyFinishContext();
6178 }
6179 
6180 /* Python wrapper */
6181 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6182 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_12transpose_dot[] = "pycLinearOperator.transpose_dot(self, vector, product) -> void\n\n ";
6183 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot = {"transpose_dot", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_12transpose_dot};
6184 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6185  PyObject *__pyx_v_vector = 0;
6186  PyObject *__pyx_v_product = 0;
6187  int __pyx_lineno = 0;
6188  const char *__pyx_filename = NULL;
6189  int __pyx_clineno = 0;
6190  PyObject *__pyx_r = 0;
6191  __Pyx_RefNannyDeclarations
6192  __Pyx_RefNannySetupContext("transpose_dot (wrapper)", 0);
6193  {
6194  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vector,&__pyx_n_s_product,0};
6195  PyObject* values[2] = {0,0};
6196  if (unlikely(__pyx_kwds)) {
6197  Py_ssize_t kw_args;
6198  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6199  switch (pos_args) {
6200  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6201  CYTHON_FALLTHROUGH;
6202  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6203  CYTHON_FALLTHROUGH;
6204  case 0: break;
6205  default: goto __pyx_L5_argtuple_error;
6206  }
6207  kw_args = PyDict_Size(__pyx_kwds);
6208  switch (pos_args) {
6209  case 0:
6210  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vector)) != 0)) kw_args--;
6211  else goto __pyx_L5_argtuple_error;
6212  CYTHON_FALLTHROUGH;
6213  case 1:
6214  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_product)) != 0)) kw_args--;
6215  else {
6216  __Pyx_RaiseArgtupleInvalid("transpose_dot", 1, 2, 2, 1); __PYX_ERR(0, 342, __pyx_L3_error)
6217  }
6218  }
6219  if (unlikely(kw_args > 0)) {
6220  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transpose_dot") < 0)) __PYX_ERR(0, 342, __pyx_L3_error)
6221  }
6222  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
6223  goto __pyx_L5_argtuple_error;
6224  } else {
6225  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6226  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6227  }
6228  __pyx_v_vector = values[0];
6229  __pyx_v_product = values[1];
6230  }
6231  goto __pyx_L4_argument_unpacking_done;
6232  __pyx_L5_argtuple_error:;
6233  __Pyx_RaiseArgtupleInvalid("transpose_dot", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 342, __pyx_L3_error)
6234  __pyx_L3_error:;
6235  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.transpose_dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
6236  __Pyx_RefNannyFinishContext();
6237  return NULL;
6238  __pyx_L4_argument_unpacking_done:;
6239  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_12transpose_dot(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self), __pyx_v_vector, __pyx_v_product);
6240 
6241  /* function exit code */
6242  __Pyx_RefNannyFinishContext();
6243  return __pyx_r;
6244 }
6245 
6246 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_12transpose_dot(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, PyObject *__pyx_v_vector, PyObject *__pyx_v_product) {
6247  PyObject *__pyx_r = NULL;
6248  __Pyx_TraceDeclarations
6249  __Pyx_RefNannyDeclarations
6250  PyObject *__pyx_t_1 = NULL;
6251  int __pyx_lineno = 0;
6252  const char *__pyx_filename = NULL;
6253  int __pyx_clineno = 0;
6254  __Pyx_TraceFrameInit(__pyx_codeobj__13)
6255  __Pyx_RefNannySetupContext("transpose_dot", 0);
6256  __Pyx_TraceCall("transpose_dot (wrapper)", __pyx_f[0], 342, 0, __PYX_ERR(0, 342, __pyx_L1_error));
6257  __Pyx_XDECREF(__pyx_r);
6258  __pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_transpose_dot(__pyx_v_self, __pyx_v_vector, __pyx_v_product, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error)
6259  __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
6260  __Pyx_GOTREF(__pyx_t_1);
6261  __pyx_r = __pyx_t_1;
6262  __pyx_t_1 = 0;
6263  goto __pyx_L0;
6264 
6265  /* function exit code */
6266  __pyx_L1_error:;
6267  __Pyx_XDECREF(__pyx_t_1);
6268  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.transpose_dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
6269  __pyx_r = NULL;
6270  __pyx_L0:;
6271  __Pyx_XGIVEREF(__pyx_r);
6272  __Pyx_TraceReturn(__pyx_r, 0);
6273  __Pyx_RefNannyFinishContext();
6274  return __pyx_r;
6275 }
6276 
6277 /* "(tree fragment)":1
6278  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6279  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6280  * def __setstate_cython__(self, __pyx_state):
6281  */
6282 
6283 /* Python wrapper */
6284 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6285 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__[] = "pycLinearOperator.__reduce_cython__(self)";
6286 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__};
6287 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6288  PyObject *__pyx_r = 0;
6289  __Pyx_RefNannyDeclarations
6290  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
6291  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self));
6292 
6293  /* function exit code */
6294  __Pyx_RefNannyFinishContext();
6295  return __pyx_r;
6296 }
6297 
6298 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self) {
6299  PyObject *__pyx_r = NULL;
6300  __Pyx_TraceDeclarations
6301  __Pyx_RefNannyDeclarations
6302  PyObject *__pyx_t_1 = NULL;
6303  int __pyx_lineno = 0;
6304  const char *__pyx_filename = NULL;
6305  int __pyx_clineno = 0;
6306  __Pyx_TraceFrameInit(__pyx_codeobj__14)
6307  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
6308  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
6309 
6310  /* "(tree fragment)":2
6311  * def __reduce_cython__(self):
6312  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
6313  * def __setstate_cython__(self, __pyx_state):
6314  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6315  */
6316  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
6317  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
6318  __Pyx_GOTREF(__pyx_t_1);
6319  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6320  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6321  __PYX_ERR(1, 2, __pyx_L1_error)
6322 
6323  /* "(tree fragment)":1
6324  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
6325  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6326  * def __setstate_cython__(self, __pyx_state):
6327  */
6328 
6329  /* function exit code */
6330  __pyx_L1_error:;
6331  __Pyx_XDECREF(__pyx_t_1);
6332  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6333  __pyx_r = NULL;
6334  __Pyx_XGIVEREF(__pyx_r);
6335  __Pyx_TraceReturn(__pyx_r, 0);
6336  __Pyx_RefNannyFinishContext();
6337  return __pyx_r;
6338 }
6339 
6340 /* "(tree fragment)":3
6341  * def __reduce_cython__(self):
6342  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6343  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6344  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6345  */
6346 
6347 /* Python wrapper */
6348 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
6349 static char __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__[] = "pycLinearOperator.__setstate_cython__(self, __pyx_state)";
6350 static PyMethodDef __pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__, METH_O, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__};
6351 static PyObject *__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
6352  PyObject *__pyx_r = 0;
6353  __Pyx_RefNannyDeclarations
6354  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
6355  __pyx_r = __pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__(((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
6356 
6357  /* function exit code */
6358  __Pyx_RefNannyFinishContext();
6359  return __pyx_r;
6360 }
6361 
6362 static PyObject *__pyx_pf_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
6363  PyObject *__pyx_r = NULL;
6364  __Pyx_TraceDeclarations
6365  __Pyx_RefNannyDeclarations
6366  PyObject *__pyx_t_1 = NULL;
6367  int __pyx_lineno = 0;
6368  const char *__pyx_filename = NULL;
6369  int __pyx_clineno = 0;
6370  __Pyx_TraceFrameInit(__pyx_codeobj__16)
6371  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
6372  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
6373 
6374  /* "(tree fragment)":4
6375  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6376  * def __setstate_cython__(self, __pyx_state):
6377  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
6378  */
6379  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
6380  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
6381  __Pyx_GOTREF(__pyx_t_1);
6382  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
6383  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6384  __PYX_ERR(1, 4, __pyx_L1_error)
6385 
6386  /* "(tree fragment)":3
6387  * def __reduce_cython__(self):
6388  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6389  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
6390  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
6391  */
6392 
6393  /* function exit code */
6394  __pyx_L1_error:;
6395  __Pyx_XDECREF(__pyx_t_1);
6396  __Pyx_AddTraceback("imate._c_linear_operator.py_c_linear_operator.pycLinearOperator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6397  __pyx_r = NULL;
6398  __Pyx_XGIVEREF(__pyx_r);
6399  __Pyx_TraceReturn(__pyx_r, 0);
6400  __Pyx_RefNannyFinishContext();
6401  return __pyx_r;
6402 }
6403 
6404 /* "View.MemoryView":123
6405  * cdef bint dtype_is_object
6406  *
6407  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
6408  * mode="c", bint allocate_buffer=True):
6409  *
6410  */
6411 
6412 /* Python wrapper */
6413 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6414 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6415  PyObject *__pyx_v_shape = 0;
6416  Py_ssize_t __pyx_v_itemsize;
6417  PyObject *__pyx_v_format = 0;
6418  PyObject *__pyx_v_mode = 0;
6419  int __pyx_v_allocate_buffer;
6420  int __pyx_lineno = 0;
6421  const char *__pyx_filename = NULL;
6422  int __pyx_clineno = 0;
6423  int __pyx_r;
6424  __Pyx_RefNannyDeclarations
6425  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6426  {
6427  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
6428  PyObject* values[5] = {0,0,0,0,0};
6429  values[3] = ((PyObject *)__pyx_n_s_c);
6430  if (unlikely(__pyx_kwds)) {
6431  Py_ssize_t kw_args;
6432  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6433  switch (pos_args) {
6434  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6435  CYTHON_FALLTHROUGH;
6436  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6437  CYTHON_FALLTHROUGH;
6438  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6439  CYTHON_FALLTHROUGH;
6440  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6441  CYTHON_FALLTHROUGH;
6442  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6443  CYTHON_FALLTHROUGH;
6444  case 0: break;
6445  default: goto __pyx_L5_argtuple_error;
6446  }
6447  kw_args = PyDict_Size(__pyx_kwds);
6448  switch (pos_args) {
6449  case 0:
6450  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
6451  else goto __pyx_L5_argtuple_error;
6452  CYTHON_FALLTHROUGH;
6453  case 1:
6454  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
6455  else {
6456  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 123, __pyx_L3_error)
6457  }
6458  CYTHON_FALLTHROUGH;
6459  case 2:
6460  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
6461  else {
6462  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 123, __pyx_L3_error)
6463  }
6464  CYTHON_FALLTHROUGH;
6465  case 3:
6466  if (kw_args > 0) {
6467  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
6468  if (value) { values[3] = value; kw_args--; }
6469  }
6470  CYTHON_FALLTHROUGH;
6471  case 4:
6472  if (kw_args > 0) {
6473  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
6474  if (value) { values[4] = value; kw_args--; }
6475  }
6476  }
6477  if (unlikely(kw_args > 0)) {
6478  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 123, __pyx_L3_error)
6479  }
6480  } else {
6481  switch (PyTuple_GET_SIZE(__pyx_args)) {
6482  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6483  CYTHON_FALLTHROUGH;
6484  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6485  CYTHON_FALLTHROUGH;
6486  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6487  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6488  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6489  break;
6490  default: goto __pyx_L5_argtuple_error;
6491  }
6492  }
6493  __pyx_v_shape = ((PyObject*)values[0]);
6494  __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L3_error)
6495  __pyx_v_format = values[2];
6496  __pyx_v_mode = values[3];
6497  if (values[4]) {
6498  __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 124, __pyx_L3_error)
6499  } else {
6500 
6501  /* "View.MemoryView":124
6502  *
6503  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
6504  * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
6505  *
6506  * cdef int idx
6507  */
6508  __pyx_v_allocate_buffer = ((int)1);
6509  }
6510  }
6511  goto __pyx_L4_argument_unpacking_done;
6512  __pyx_L5_argtuple_error:;
6513  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 123, __pyx_L3_error)
6514  __pyx_L3_error:;
6515  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6516  __Pyx_RefNannyFinishContext();
6517  return -1;
6518  __pyx_L4_argument_unpacking_done:;
6519  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 123, __pyx_L1_error)
6520  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
6521  PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 123, __pyx_L1_error)
6522  }
6523  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
6524 
6525  /* "View.MemoryView":123
6526  * cdef bint dtype_is_object
6527  *
6528  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
6529  * mode="c", bint allocate_buffer=True):
6530  *
6531  */
6532 
6533  /* function exit code */
6534  goto __pyx_L0;
6535  __pyx_L1_error:;
6536  __pyx_r = -1;
6537  __pyx_L0:;
6538  __Pyx_RefNannyFinishContext();
6539  return __pyx_r;
6540 }
6541 
6542 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
6543  int __pyx_v_idx;
6544  Py_ssize_t __pyx_v_i;
6545  Py_ssize_t __pyx_v_dim;
6546  PyObject **__pyx_v_p;
6547  char __pyx_v_order;
6548  int __pyx_r;
6549  __Pyx_TraceDeclarations
6550  __Pyx_RefNannyDeclarations
6551  Py_ssize_t __pyx_t_1;
6552  int __pyx_t_2;
6553  PyObject *__pyx_t_3 = NULL;
6554  int __pyx_t_4;
6555  PyObject *__pyx_t_5 = NULL;
6556  PyObject *__pyx_t_6 = NULL;
6557  char *__pyx_t_7;
6558  int __pyx_t_8;
6559  Py_ssize_t __pyx_t_9;
6560  PyObject *__pyx_t_10 = NULL;
6561  Py_ssize_t __pyx_t_11;
6562  int __pyx_lineno = 0;
6563  const char *__pyx_filename = NULL;
6564  int __pyx_clineno = 0;
6565  __Pyx_RefNannySetupContext("__cinit__", 0);
6566  __Pyx_TraceCall("__cinit__", __pyx_f[1], 123, 0, __PYX_ERR(1, 123, __pyx_L1_error));
6567  __Pyx_INCREF(__pyx_v_format);
6568 
6569  /* "View.MemoryView":130
6570  * cdef PyObject **p
6571  *
6572  * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
6573  * self.itemsize = itemsize
6574  *
6575  */
6576  __Pyx_TraceLine(130,0,__PYX_ERR(1, 130, __pyx_L1_error))
6577  if (unlikely(__pyx_v_shape == Py_None)) {
6578  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
6579  __PYX_ERR(1, 130, __pyx_L1_error)
6580  }
6581  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 130, __pyx_L1_error)
6582  __pyx_v_self->ndim = ((int)__pyx_t_1);
6583 
6584  /* "View.MemoryView":131
6585  *
6586  * self.ndim = <int> len(shape)
6587  * self.itemsize = itemsize # <<<<<<<<<<<<<<
6588  *
6589  * if not self.ndim:
6590  */
6591  __Pyx_TraceLine(131,0,__PYX_ERR(1, 131, __pyx_L1_error))
6592  __pyx_v_self->itemsize = __pyx_v_itemsize;
6593 
6594  /* "View.MemoryView":133
6595  * self.itemsize = itemsize
6596  *
6597  * if not self.ndim: # <<<<<<<<<<<<<<
6598  * raise ValueError("Empty shape tuple for cython.array")
6599  *
6600  */
6601  __Pyx_TraceLine(133,0,__PYX_ERR(1, 133, __pyx_L1_error))
6602  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
6603  if (unlikely(__pyx_t_2)) {
6604 
6605  /* "View.MemoryView":134
6606  *
6607  * if not self.ndim:
6608  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
6609  *
6610  * if itemsize <= 0:
6611  */
6612  __Pyx_TraceLine(134,0,__PYX_ERR(1, 134, __pyx_L1_error))
6613  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 134, __pyx_L1_error)
6614  __Pyx_GOTREF(__pyx_t_3);
6615  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6616  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6617  __PYX_ERR(1, 134, __pyx_L1_error)
6618 
6619  /* "View.MemoryView":133
6620  * self.itemsize = itemsize
6621  *
6622  * if not self.ndim: # <<<<<<<<<<<<<<
6623  * raise ValueError("Empty shape tuple for cython.array")
6624  *
6625  */
6626  }
6627 
6628  /* "View.MemoryView":136
6629  * raise ValueError("Empty shape tuple for cython.array")
6630  *
6631  * if itemsize <= 0: # <<<<<<<<<<<<<<
6632  * raise ValueError("itemsize <= 0 for cython.array")
6633  *
6634  */
6635  __Pyx_TraceLine(136,0,__PYX_ERR(1, 136, __pyx_L1_error))
6636  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
6637  if (unlikely(__pyx_t_2)) {
6638 
6639  /* "View.MemoryView":137
6640  *
6641  * if itemsize <= 0:
6642  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
6643  *
6644  * if not isinstance(format, bytes):
6645  */
6646  __Pyx_TraceLine(137,0,__PYX_ERR(1, 137, __pyx_L1_error))
6647  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 137, __pyx_L1_error)
6648  __Pyx_GOTREF(__pyx_t_3);
6649  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6650  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6651  __PYX_ERR(1, 137, __pyx_L1_error)
6652 
6653  /* "View.MemoryView":136
6654  * raise ValueError("Empty shape tuple for cython.array")
6655  *
6656  * if itemsize <= 0: # <<<<<<<<<<<<<<
6657  * raise ValueError("itemsize <= 0 for cython.array")
6658  *
6659  */
6660  }
6661 
6662  /* "View.MemoryView":139
6663  * raise ValueError("itemsize <= 0 for cython.array")
6664  *
6665  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
6666  * format = format.encode('ASCII')
6667  * self._format = format # keep a reference to the byte string
6668  */
6669  __Pyx_TraceLine(139,0,__PYX_ERR(1, 139, __pyx_L1_error))
6670  __pyx_t_2 = PyBytes_Check(__pyx_v_format);
6671  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
6672  if (__pyx_t_4) {
6673 
6674  /* "View.MemoryView":140
6675  *
6676  * if not isinstance(format, bytes):
6677  * format = format.encode('ASCII') # <<<<<<<<<<<<<<
6678  * self._format = format # keep a reference to the byte string
6679  * self.format = self._format
6680  */
6681  __Pyx_TraceLine(140,0,__PYX_ERR(1, 140, __pyx_L1_error))
6682  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 140, __pyx_L1_error)
6683  __Pyx_GOTREF(__pyx_t_5);
6684  __pyx_t_6 = NULL;
6685  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
6686  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
6687  if (likely(__pyx_t_6)) {
6688  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6689  __Pyx_INCREF(__pyx_t_6);
6690  __Pyx_INCREF(function);
6691  __Pyx_DECREF_SET(__pyx_t_5, function);
6692  }
6693  }
6694  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
6695  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6696  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 140, __pyx_L1_error)
6697  __Pyx_GOTREF(__pyx_t_3);
6698  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6699  __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
6700  __pyx_t_3 = 0;
6701 
6702  /* "View.MemoryView":139
6703  * raise ValueError("itemsize <= 0 for cython.array")
6704  *
6705  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
6706  * format = format.encode('ASCII')
6707  * self._format = format # keep a reference to the byte string
6708  */
6709  }
6710 
6711  /* "View.MemoryView":141
6712  * if not isinstance(format, bytes):
6713  * format = format.encode('ASCII')
6714  * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
6715  * self.format = self._format
6716  *
6717  */
6718  __Pyx_TraceLine(141,0,__PYX_ERR(1, 141, __pyx_L1_error))
6719  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(1, 141, __pyx_L1_error)
6720  __pyx_t_3 = __pyx_v_format;
6721  __Pyx_INCREF(__pyx_t_3);
6722  __Pyx_GIVEREF(__pyx_t_3);
6723  __Pyx_GOTREF(__pyx_v_self->_format);
6724  __Pyx_DECREF(__pyx_v_self->_format);
6725  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
6726  __pyx_t_3 = 0;
6727 
6728  /* "View.MemoryView":142
6729  * format = format.encode('ASCII')
6730  * self._format = format # keep a reference to the byte string
6731  * self.format = self._format # <<<<<<<<<<<<<<
6732  *
6733  *
6734  */
6735  __Pyx_TraceLine(142,0,__PYX_ERR(1, 142, __pyx_L1_error))
6736  if (unlikely(__pyx_v_self->_format == Py_None)) {
6737  PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
6738  __PYX_ERR(1, 142, __pyx_L1_error)
6739  }
6740  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 142, __pyx_L1_error)
6741  __pyx_v_self->format = __pyx_t_7;
6742 
6743  /* "View.MemoryView":145
6744  *
6745  *
6746  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
6747  * self._strides = self._shape + self.ndim
6748  *
6749  */
6750  __Pyx_TraceLine(145,0,__PYX_ERR(1, 145, __pyx_L1_error))
6751  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
6752 
6753  /* "View.MemoryView":146
6754  *
6755  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
6756  * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
6757  *
6758  * if not self._shape:
6759  */
6760  __Pyx_TraceLine(146,0,__PYX_ERR(1, 146, __pyx_L1_error))
6761  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
6762 
6763  /* "View.MemoryView":148
6764  * self._strides = self._shape + self.ndim
6765  *
6766  * if not self._shape: # <<<<<<<<<<<<<<
6767  * raise MemoryError("unable to allocate shape and strides.")
6768  *
6769  */
6770  __Pyx_TraceLine(148,0,__PYX_ERR(1, 148, __pyx_L1_error))
6771  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
6772  if (unlikely(__pyx_t_4)) {
6773 
6774  /* "View.MemoryView":149
6775  *
6776  * if not self._shape:
6777  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
6778  *
6779  *
6780  */
6781  __Pyx_TraceLine(149,0,__PYX_ERR(1, 149, __pyx_L1_error))
6782  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 149, __pyx_L1_error)
6783  __Pyx_GOTREF(__pyx_t_3);
6784  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
6785  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6786  __PYX_ERR(1, 149, __pyx_L1_error)
6787 
6788  /* "View.MemoryView":148
6789  * self._strides = self._shape + self.ndim
6790  *
6791  * if not self._shape: # <<<<<<<<<<<<<<
6792  * raise MemoryError("unable to allocate shape and strides.")
6793  *
6794  */
6795  }
6796 
6797  /* "View.MemoryView":152
6798  *
6799  *
6800  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
6801  * if dim <= 0:
6802  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6803  */
6804  __Pyx_TraceLine(152,0,__PYX_ERR(1, 152, __pyx_L1_error))
6805  __pyx_t_8 = 0;
6806  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
6807  for (;;) {
6808  if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
6809  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6810  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 152, __pyx_L1_error)
6811  #else
6812  __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 152, __pyx_L1_error)
6813  __Pyx_GOTREF(__pyx_t_5);
6814  #endif
6815  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 152, __pyx_L1_error)
6816  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6817  __pyx_v_dim = __pyx_t_9;
6818  __pyx_v_idx = __pyx_t_8;
6819  __pyx_t_8 = (__pyx_t_8 + 1);
6820 
6821  /* "View.MemoryView":153
6822  *
6823  * for idx, dim in enumerate(shape):
6824  * if dim <= 0: # <<<<<<<<<<<<<<
6825  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6826  * self._shape[idx] = dim
6827  */
6828  __Pyx_TraceLine(153,0,__PYX_ERR(1, 153, __pyx_L1_error))
6829  __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
6830  if (unlikely(__pyx_t_4)) {
6831 
6832  /* "View.MemoryView":154
6833  * for idx, dim in enumerate(shape):
6834  * if dim <= 0:
6835  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<<
6836  * self._shape[idx] = dim
6837  *
6838  */
6839  __Pyx_TraceLine(154,0,__PYX_ERR(1, 154, __pyx_L1_error))
6840  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 154, __pyx_L1_error)
6841  __Pyx_GOTREF(__pyx_t_5);
6842  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
6843  __Pyx_GOTREF(__pyx_t_6);
6844  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 154, __pyx_L1_error)
6845  __Pyx_GOTREF(__pyx_t_10);
6846  __Pyx_GIVEREF(__pyx_t_5);
6847  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
6848  __Pyx_GIVEREF(__pyx_t_6);
6849  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
6850  __pyx_t_5 = 0;
6851  __pyx_t_6 = 0;
6852  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
6853  __Pyx_GOTREF(__pyx_t_6);
6854  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6855  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 154, __pyx_L1_error)
6856  __Pyx_GOTREF(__pyx_t_10);
6857  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6858  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
6859  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6860  __PYX_ERR(1, 154, __pyx_L1_error)
6861 
6862  /* "View.MemoryView":153
6863  *
6864  * for idx, dim in enumerate(shape):
6865  * if dim <= 0: # <<<<<<<<<<<<<<
6866  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6867  * self._shape[idx] = dim
6868  */
6869  }
6870 
6871  /* "View.MemoryView":155
6872  * if dim <= 0:
6873  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6874  * self._shape[idx] = dim # <<<<<<<<<<<<<<
6875  *
6876  * cdef char order
6877  */
6878  __Pyx_TraceLine(155,0,__PYX_ERR(1, 155, __pyx_L1_error))
6879  (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
6880 
6881  /* "View.MemoryView":152
6882  *
6883  *
6884  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
6885  * if dim <= 0:
6886  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
6887  */
6888  __Pyx_TraceLine(152,0,__PYX_ERR(1, 152, __pyx_L1_error))
6889  }
6890  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6891 
6892  /* "View.MemoryView":158
6893  *
6894  * cdef char order
6895  * if mode == 'fortran': # <<<<<<<<<<<<<<
6896  * order = b'F'
6897  * self.mode = u'fortran'
6898  */
6899  __Pyx_TraceLine(158,0,__PYX_ERR(1, 158, __pyx_L1_error))
6900  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 158, __pyx_L1_error)
6901  if (__pyx_t_4) {
6902 
6903  /* "View.MemoryView":159
6904  * cdef char order
6905  * if mode == 'fortran':
6906  * order = b'F' # <<<<<<<<<<<<<<
6907  * self.mode = u'fortran'
6908  * elif mode == 'c':
6909  */
6910  __Pyx_TraceLine(159,0,__PYX_ERR(1, 159, __pyx_L1_error))
6911  __pyx_v_order = 'F';
6912 
6913  /* "View.MemoryView":160
6914  * if mode == 'fortran':
6915  * order = b'F'
6916  * self.mode = u'fortran' # <<<<<<<<<<<<<<
6917  * elif mode == 'c':
6918  * order = b'C'
6919  */
6920  __Pyx_TraceLine(160,0,__PYX_ERR(1, 160, __pyx_L1_error))
6921  __Pyx_INCREF(__pyx_n_u_fortran);
6922  __Pyx_GIVEREF(__pyx_n_u_fortran);
6923  __Pyx_GOTREF(__pyx_v_self->mode);
6924  __Pyx_DECREF(__pyx_v_self->mode);
6925  __pyx_v_self->mode = __pyx_n_u_fortran;
6926 
6927  /* "View.MemoryView":158
6928  *
6929  * cdef char order
6930  * if mode == 'fortran': # <<<<<<<<<<<<<<
6931  * order = b'F'
6932  * self.mode = u'fortran'
6933  */
6934  goto __pyx_L10;
6935  }
6936 
6937  /* "View.MemoryView":161
6938  * order = b'F'
6939  * self.mode = u'fortran'
6940  * elif mode == 'c': # <<<<<<<<<<<<<<
6941  * order = b'C'
6942  * self.mode = u'c'
6943  */
6944  __Pyx_TraceLine(161,0,__PYX_ERR(1, 161, __pyx_L1_error))
6945  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 161, __pyx_L1_error)
6946  if (likely(__pyx_t_4)) {
6947 
6948  /* "View.MemoryView":162
6949  * self.mode = u'fortran'
6950  * elif mode == 'c':
6951  * order = b'C' # <<<<<<<<<<<<<<
6952  * self.mode = u'c'
6953  * else:
6954  */
6955  __Pyx_TraceLine(162,0,__PYX_ERR(1, 162, __pyx_L1_error))
6956  __pyx_v_order = 'C';
6957 
6958  /* "View.MemoryView":163
6959  * elif mode == 'c':
6960  * order = b'C'
6961  * self.mode = u'c' # <<<<<<<<<<<<<<
6962  * else:
6963  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
6964  */
6965  __Pyx_TraceLine(163,0,__PYX_ERR(1, 163, __pyx_L1_error))
6966  __Pyx_INCREF(__pyx_n_u_c);
6967  __Pyx_GIVEREF(__pyx_n_u_c);
6968  __Pyx_GOTREF(__pyx_v_self->mode);
6969  __Pyx_DECREF(__pyx_v_self->mode);
6970  __pyx_v_self->mode = __pyx_n_u_c;
6971 
6972  /* "View.MemoryView":161
6973  * order = b'F'
6974  * self.mode = u'fortran'
6975  * elif mode == 'c': # <<<<<<<<<<<<<<
6976  * order = b'C'
6977  * self.mode = u'c'
6978  */
6979  goto __pyx_L10;
6980  }
6981 
6982  /* "View.MemoryView":165
6983  * self.mode = u'c'
6984  * else:
6985  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<<
6986  *
6987  * self.len = fill_contig_strides_array(self._shape, self._strides,
6988  */
6989  __Pyx_TraceLine(165,0,__PYX_ERR(1, 165, __pyx_L1_error))
6990  /*else*/ {
6991  __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 165, __pyx_L1_error)
6992  __Pyx_GOTREF(__pyx_t_3);
6993  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 165, __pyx_L1_error)
6994  __Pyx_GOTREF(__pyx_t_10);
6995  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6996  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
6997  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
6998  __PYX_ERR(1, 165, __pyx_L1_error)
6999  }
7000  __pyx_L10:;
7001 
7002  /* "View.MemoryView":167
7003  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
7004  *
7005  * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<<
7006  * itemsize, self.ndim, order)
7007  *
7008  */
7009  __Pyx_TraceLine(167,0,__PYX_ERR(1, 167, __pyx_L1_error))
7010  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
7011 
7012  /* "View.MemoryView":170
7013  * itemsize, self.ndim, order)
7014  *
7015  * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
7016  * self.dtype_is_object = format == b'O'
7017  * if allocate_buffer:
7018  */
7019  __Pyx_TraceLine(170,0,__PYX_ERR(1, 170, __pyx_L1_error))
7020  __pyx_v_self->free_data = __pyx_v_allocate_buffer;
7021 
7022  /* "View.MemoryView":171
7023  *
7024  * self.free_data = allocate_buffer
7025  * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
7026  * if allocate_buffer:
7027  *
7028  */
7029  __Pyx_TraceLine(171,0,__PYX_ERR(1, 171, __pyx_L1_error))
7030  __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 171, __pyx_L1_error)
7031  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 171, __pyx_L1_error)
7032  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7033  __pyx_v_self->dtype_is_object = __pyx_t_4;
7034 
7035  /* "View.MemoryView":172
7036  * self.free_data = allocate_buffer
7037  * self.dtype_is_object = format == b'O'
7038  * if allocate_buffer: # <<<<<<<<<<<<<<
7039  *
7040  *
7041  */
7042  __Pyx_TraceLine(172,0,__PYX_ERR(1, 172, __pyx_L1_error))
7043  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
7044  if (__pyx_t_4) {
7045 
7046  /* "View.MemoryView":175
7047  *
7048  *
7049  * self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<<
7050  * if not self.data:
7051  * raise MemoryError("unable to allocate array data.")
7052  */
7053  __Pyx_TraceLine(175,0,__PYX_ERR(1, 175, __pyx_L1_error))
7054  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
7055 
7056  /* "View.MemoryView":176
7057  *
7058  * self.data = <char *>malloc(self.len)
7059  * if not self.data: # <<<<<<<<<<<<<<
7060  * raise MemoryError("unable to allocate array data.")
7061  *
7062  */
7063  __Pyx_TraceLine(176,0,__PYX_ERR(1, 176, __pyx_L1_error))
7064  __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
7065  if (unlikely(__pyx_t_4)) {
7066 
7067  /* "View.MemoryView":177
7068  * self.data = <char *>malloc(self.len)
7069  * if not self.data:
7070  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
7071  *
7072  * if self.dtype_is_object:
7073  */
7074  __Pyx_TraceLine(177,0,__PYX_ERR(1, 177, __pyx_L1_error))
7075  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 177, __pyx_L1_error)
7076  __Pyx_GOTREF(__pyx_t_10);
7077  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
7078  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7079  __PYX_ERR(1, 177, __pyx_L1_error)
7080 
7081  /* "View.MemoryView":176
7082  *
7083  * self.data = <char *>malloc(self.len)
7084  * if not self.data: # <<<<<<<<<<<<<<
7085  * raise MemoryError("unable to allocate array data.")
7086  *
7087  */
7088  }
7089 
7090  /* "View.MemoryView":179
7091  * raise MemoryError("unable to allocate array data.")
7092  *
7093  * if self.dtype_is_object: # <<<<<<<<<<<<<<
7094  * p = <PyObject **> self.data
7095  * for i in range(self.len / itemsize):
7096  */
7097  __Pyx_TraceLine(179,0,__PYX_ERR(1, 179, __pyx_L1_error))
7098  __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
7099  if (__pyx_t_4) {
7100 
7101  /* "View.MemoryView":180
7102  *
7103  * if self.dtype_is_object:
7104  * p = <PyObject **> self.data # <<<<<<<<<<<<<<
7105  * for i in range(self.len / itemsize):
7106  * p[i] = Py_None
7107  */
7108  __Pyx_TraceLine(180,0,__PYX_ERR(1, 180, __pyx_L1_error))
7109  __pyx_v_p = ((PyObject **)__pyx_v_self->data);
7110 
7111  /* "View.MemoryView":181
7112  * if self.dtype_is_object:
7113  * p = <PyObject **> self.data
7114  * for i in range(self.len / itemsize): # <<<<<<<<<<<<<<
7115  * p[i] = Py_None
7116  * Py_INCREF(Py_None)
7117  */
7118  __Pyx_TraceLine(181,0,__PYX_ERR(1, 181, __pyx_L1_error))
7119  if (unlikely(__pyx_v_itemsize == 0)) {
7120  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
7121  __PYX_ERR(1, 181, __pyx_L1_error)
7122  }
7123  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
7124  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
7125  __PYX_ERR(1, 181, __pyx_L1_error)
7126  }
7127  __pyx_t_1 = (__pyx_v_self->len / __pyx_v_itemsize);
7128  __pyx_t_9 = __pyx_t_1;
7129  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
7130  __pyx_v_i = __pyx_t_11;
7131 
7132  /* "View.MemoryView":182
7133  * p = <PyObject **> self.data
7134  * for i in range(self.len / itemsize):
7135  * p[i] = Py_None # <<<<<<<<<<<<<<
7136  * Py_INCREF(Py_None)
7137  *
7138  */
7139  __Pyx_TraceLine(182,0,__PYX_ERR(1, 182, __pyx_L1_error))
7140  (__pyx_v_p[__pyx_v_i]) = Py_None;
7141 
7142  /* "View.MemoryView":183
7143  * for i in range(self.len / itemsize):
7144  * p[i] = Py_None
7145  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
7146  *
7147  * @cname('getbuffer')
7148  */
7149  __Pyx_TraceLine(183,0,__PYX_ERR(1, 183, __pyx_L1_error))
7150  Py_INCREF(Py_None);
7151  }
7152 
7153  /* "View.MemoryView":179
7154  * raise MemoryError("unable to allocate array data.")
7155  *
7156  * if self.dtype_is_object: # <<<<<<<<<<<<<<
7157  * p = <PyObject **> self.data
7158  * for i in range(self.len / itemsize):
7159  */
7160  }
7161 
7162  /* "View.MemoryView":172
7163  * self.free_data = allocate_buffer
7164  * self.dtype_is_object = format == b'O'
7165  * if allocate_buffer: # <<<<<<<<<<<<<<
7166  *
7167  *
7168  */
7169  }
7170 
7171  /* "View.MemoryView":123
7172  * cdef bint dtype_is_object
7173  *
7174  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
7175  * mode="c", bint allocate_buffer=True):
7176  *
7177  */
7178 
7179  /* function exit code */
7180  __pyx_r = 0;
7181  goto __pyx_L0;
7182  __pyx_L1_error:;
7183  __Pyx_XDECREF(__pyx_t_3);
7184  __Pyx_XDECREF(__pyx_t_5);
7185  __Pyx_XDECREF(__pyx_t_6);
7186  __Pyx_XDECREF(__pyx_t_10);
7187  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7188  __pyx_r = -1;
7189  __pyx_L0:;
7190  __Pyx_XDECREF(__pyx_v_format);
7191  __Pyx_TraceReturn(Py_None, 0);
7192  __Pyx_RefNannyFinishContext();
7193  return __pyx_r;
7194 }
7195 
7196 /* "View.MemoryView":186
7197  *
7198  * @cname('getbuffer')
7199  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
7200  * cdef int bufmode = -1
7201  * if self.mode == u"c":
7202  */
7203 
7204 /* Python wrapper */
7205 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
7206 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
7207  int __pyx_r;
7208  __Pyx_RefNannyDeclarations
7209  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
7210  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
7211 
7212  /* function exit code */
7213  __Pyx_RefNannyFinishContext();
7214  return __pyx_r;
7215 }
7216 
7217 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
7218  int __pyx_v_bufmode;
7219  int __pyx_r;
7220  __Pyx_TraceDeclarations
7221  __Pyx_RefNannyDeclarations
7222  int __pyx_t_1;
7223  int __pyx_t_2;
7224  PyObject *__pyx_t_3 = NULL;
7225  char *__pyx_t_4;
7226  Py_ssize_t __pyx_t_5;
7227  int __pyx_t_6;
7228  Py_ssize_t *__pyx_t_7;
7229  int __pyx_lineno = 0;
7230  const char *__pyx_filename = NULL;
7231  int __pyx_clineno = 0;
7232  if (__pyx_v_info == NULL) {
7233  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
7234  return -1;
7235  }
7236  __Pyx_RefNannySetupContext("__getbuffer__", 0);
7237  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
7238  __Pyx_GIVEREF(__pyx_v_info->obj);
7239  __Pyx_TraceCall("__getbuffer__", __pyx_f[1], 186, 0, __PYX_ERR(1, 186, __pyx_L1_error));
7240 
7241  /* "View.MemoryView":187
7242  * @cname('getbuffer')
7243  * def __getbuffer__(self, Py_buffer *info, int flags):
7244  * cdef int bufmode = -1 # <<<<<<<<<<<<<<
7245  * if self.mode == u"c":
7246  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7247  */
7248  __Pyx_TraceLine(187,0,__PYX_ERR(1, 187, __pyx_L1_error))
7249  __pyx_v_bufmode = -1;
7250 
7251  /* "View.MemoryView":188
7252  * def __getbuffer__(self, Py_buffer *info, int flags):
7253  * cdef int bufmode = -1
7254  * if self.mode == u"c": # <<<<<<<<<<<<<<
7255  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7256  * elif self.mode == u"fortran":
7257  */
7258  __Pyx_TraceLine(188,0,__PYX_ERR(1, 188, __pyx_L1_error))
7259  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 188, __pyx_L1_error)
7260  __pyx_t_2 = (__pyx_t_1 != 0);
7261  if (__pyx_t_2) {
7262 
7263  /* "View.MemoryView":189
7264  * cdef int bufmode = -1
7265  * if self.mode == u"c":
7266  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
7267  * elif self.mode == u"fortran":
7268  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7269  */
7270  __Pyx_TraceLine(189,0,__PYX_ERR(1, 189, __pyx_L1_error))
7271  __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
7272 
7273  /* "View.MemoryView":188
7274  * def __getbuffer__(self, Py_buffer *info, int flags):
7275  * cdef int bufmode = -1
7276  * if self.mode == u"c": # <<<<<<<<<<<<<<
7277  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7278  * elif self.mode == u"fortran":
7279  */
7280  goto __pyx_L3;
7281  }
7282 
7283  /* "View.MemoryView":190
7284  * if self.mode == u"c":
7285  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7286  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
7287  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7288  * if not (flags & bufmode):
7289  */
7290  __Pyx_TraceLine(190,0,__PYX_ERR(1, 190, __pyx_L1_error))
7291  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 190, __pyx_L1_error)
7292  __pyx_t_1 = (__pyx_t_2 != 0);
7293  if (__pyx_t_1) {
7294 
7295  /* "View.MemoryView":191
7296  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7297  * elif self.mode == u"fortran":
7298  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
7299  * if not (flags & bufmode):
7300  * raise ValueError("Can only create a buffer that is contiguous in memory.")
7301  */
7302  __Pyx_TraceLine(191,0,__PYX_ERR(1, 191, __pyx_L1_error))
7303  __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
7304 
7305  /* "View.MemoryView":190
7306  * if self.mode == u"c":
7307  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7308  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
7309  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7310  * if not (flags & bufmode):
7311  */
7312  }
7313  __pyx_L3:;
7314 
7315  /* "View.MemoryView":192
7316  * elif self.mode == u"fortran":
7317  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7318  * if not (flags & bufmode): # <<<<<<<<<<<<<<
7319  * raise ValueError("Can only create a buffer that is contiguous in memory.")
7320  * info.buf = self.data
7321  */
7322  __Pyx_TraceLine(192,0,__PYX_ERR(1, 192, __pyx_L1_error))
7323  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
7324  if (unlikely(__pyx_t_1)) {
7325 
7326  /* "View.MemoryView":193
7327  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7328  * if not (flags & bufmode):
7329  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
7330  * info.buf = self.data
7331  * info.len = self.len
7332  */
7333  __Pyx_TraceLine(193,0,__PYX_ERR(1, 193, __pyx_L1_error))
7334  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 193, __pyx_L1_error)
7335  __Pyx_GOTREF(__pyx_t_3);
7336  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
7337  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7338  __PYX_ERR(1, 193, __pyx_L1_error)
7339 
7340  /* "View.MemoryView":192
7341  * elif self.mode == u"fortran":
7342  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
7343  * if not (flags & bufmode): # <<<<<<<<<<<<<<
7344  * raise ValueError("Can only create a buffer that is contiguous in memory.")
7345  * info.buf = self.data
7346  */
7347  }
7348 
7349  /* "View.MemoryView":194
7350  * if not (flags & bufmode):
7351  * raise ValueError("Can only create a buffer that is contiguous in memory.")
7352  * info.buf = self.data # <<<<<<<<<<<<<<
7353  * info.len = self.len
7354  * info.ndim = self.ndim
7355  */
7356  __Pyx_TraceLine(194,0,__PYX_ERR(1, 194, __pyx_L1_error))
7357  __pyx_t_4 = __pyx_v_self->data;
7358  __pyx_v_info->buf = __pyx_t_4;
7359 
7360  /* "View.MemoryView":195
7361  * raise ValueError("Can only create a buffer that is contiguous in memory.")
7362  * info.buf = self.data
7363  * info.len = self.len # <<<<<<<<<<<<<<
7364  * info.ndim = self.ndim
7365  * info.shape = self._shape
7366  */
7367  __Pyx_TraceLine(195,0,__PYX_ERR(1, 195, __pyx_L1_error))
7368  __pyx_t_5 = __pyx_v_self->len;
7369  __pyx_v_info->len = __pyx_t_5;
7370 
7371  /* "View.MemoryView":196
7372  * info.buf = self.data
7373  * info.len = self.len
7374  * info.ndim = self.ndim # <<<<<<<<<<<<<<
7375  * info.shape = self._shape
7376  * info.strides = self._strides
7377  */
7378  __Pyx_TraceLine(196,0,__PYX_ERR(1, 196, __pyx_L1_error))
7379  __pyx_t_6 = __pyx_v_self->ndim;
7380  __pyx_v_info->ndim = __pyx_t_6;
7381 
7382  /* "View.MemoryView":197
7383  * info.len = self.len
7384  * info.ndim = self.ndim
7385  * info.shape = self._shape # <<<<<<<<<<<<<<
7386  * info.strides = self._strides
7387  * info.suboffsets = NULL
7388  */
7389  __Pyx_TraceLine(197,0,__PYX_ERR(1, 197, __pyx_L1_error))
7390  __pyx_t_7 = __pyx_v_self->_shape;
7391  __pyx_v_info->shape = __pyx_t_7;
7392 
7393  /* "View.MemoryView":198
7394  * info.ndim = self.ndim
7395  * info.shape = self._shape
7396  * info.strides = self._strides # <<<<<<<<<<<<<<
7397  * info.suboffsets = NULL
7398  * info.itemsize = self.itemsize
7399  */
7400  __Pyx_TraceLine(198,0,__PYX_ERR(1, 198, __pyx_L1_error))
7401  __pyx_t_7 = __pyx_v_self->_strides;
7402  __pyx_v_info->strides = __pyx_t_7;
7403 
7404  /* "View.MemoryView":199
7405  * info.shape = self._shape
7406  * info.strides = self._strides
7407  * info.suboffsets = NULL # <<<<<<<<<<<<<<
7408  * info.itemsize = self.itemsize
7409  * info.readonly = 0
7410  */
7411  __Pyx_TraceLine(199,0,__PYX_ERR(1, 199, __pyx_L1_error))
7412  __pyx_v_info->suboffsets = NULL;
7413 
7414  /* "View.MemoryView":200
7415  * info.strides = self._strides
7416  * info.suboffsets = NULL
7417  * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
7418  * info.readonly = 0
7419  *
7420  */
7421  __Pyx_TraceLine(200,0,__PYX_ERR(1, 200, __pyx_L1_error))
7422  __pyx_t_5 = __pyx_v_self->itemsize;
7423  __pyx_v_info->itemsize = __pyx_t_5;
7424 
7425  /* "View.MemoryView":201
7426  * info.suboffsets = NULL
7427  * info.itemsize = self.itemsize
7428  * info.readonly = 0 # <<<<<<<<<<<<<<
7429  *
7430  * if flags & PyBUF_FORMAT:
7431  */
7432  __Pyx_TraceLine(201,0,__PYX_ERR(1, 201, __pyx_L1_error))
7433  __pyx_v_info->readonly = 0;
7434 
7435  /* "View.MemoryView":203
7436  * info.readonly = 0
7437  *
7438  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
7439  * info.format = self.format
7440  * else:
7441  */
7442  __Pyx_TraceLine(203,0,__PYX_ERR(1, 203, __pyx_L1_error))
7443  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
7444  if (__pyx_t_1) {
7445 
7446  /* "View.MemoryView":204
7447  *
7448  * if flags & PyBUF_FORMAT:
7449  * info.format = self.format # <<<<<<<<<<<<<<
7450  * else:
7451  * info.format = NULL
7452  */
7453  __Pyx_TraceLine(204,0,__PYX_ERR(1, 204, __pyx_L1_error))
7454  __pyx_t_4 = __pyx_v_self->format;
7455  __pyx_v_info->format = __pyx_t_4;
7456 
7457  /* "View.MemoryView":203
7458  * info.readonly = 0
7459  *
7460  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
7461  * info.format = self.format
7462  * else:
7463  */
7464  goto __pyx_L5;
7465  }
7466 
7467  /* "View.MemoryView":206
7468  * info.format = self.format
7469  * else:
7470  * info.format = NULL # <<<<<<<<<<<<<<
7471  *
7472  * info.obj = self
7473  */
7474  __Pyx_TraceLine(206,0,__PYX_ERR(1, 206, __pyx_L1_error))
7475  /*else*/ {
7476  __pyx_v_info->format = NULL;
7477  }
7478  __pyx_L5:;
7479 
7480  /* "View.MemoryView":208
7481  * info.format = NULL
7482  *
7483  * info.obj = self # <<<<<<<<<<<<<<
7484  *
7485  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
7486  */
7487  __Pyx_TraceLine(208,0,__PYX_ERR(1, 208, __pyx_L1_error))
7488  __Pyx_INCREF(((PyObject *)__pyx_v_self));
7489  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7490  __Pyx_GOTREF(__pyx_v_info->obj);
7491  __Pyx_DECREF(__pyx_v_info->obj);
7492  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
7493 
7494  /* "View.MemoryView":186
7495  *
7496  * @cname('getbuffer')
7497  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
7498  * cdef int bufmode = -1
7499  * if self.mode == u"c":
7500  */
7501 
7502  /* function exit code */
7503  __pyx_r = 0;
7504  goto __pyx_L0;
7505  __pyx_L1_error:;
7506  __Pyx_XDECREF(__pyx_t_3);
7507  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7508  __pyx_r = -1;
7509  if (__pyx_v_info->obj != NULL) {
7510  __Pyx_GOTREF(__pyx_v_info->obj);
7511  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
7512  }
7513  goto __pyx_L2;
7514  __pyx_L0:;
7515  if (__pyx_v_info->obj == Py_None) {
7516  __Pyx_GOTREF(__pyx_v_info->obj);
7517  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
7518  }
7519  __pyx_L2:;
7520  __Pyx_TraceReturn(Py_None, 0);
7521  __Pyx_RefNannyFinishContext();
7522  return __pyx_r;
7523 }
7524 
7525 /* "View.MemoryView":212
7526  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
7527  *
7528  * def __dealloc__(array self): # <<<<<<<<<<<<<<
7529  * if self.callback_free_data != NULL:
7530  * self.callback_free_data(self.data)
7531  */
7532 
7533 /* Python wrapper */
7534 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
7535 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
7536  __Pyx_RefNannyDeclarations
7537  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7538  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
7539 
7540  /* function exit code */
7541  __Pyx_RefNannyFinishContext();
7542 }
7543 
7544 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
7545  __Pyx_TraceDeclarations
7546  __Pyx_RefNannyDeclarations
7547  int __pyx_t_1;
7548  int __pyx_lineno = 0;
7549  const char *__pyx_filename = NULL;
7550  int __pyx_clineno = 0;
7551  __Pyx_RefNannySetupContext("__dealloc__", 0);
7552  __Pyx_TraceCall("__dealloc__", __pyx_f[1], 212, 0, __PYX_ERR(1, 212, __pyx_L1_error));
7553 
7554  /* "View.MemoryView":213
7555  *
7556  * def __dealloc__(array self):
7557  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
7558  * self.callback_free_data(self.data)
7559  * elif self.free_data:
7560  */
7561  __Pyx_TraceLine(213,0,__PYX_ERR(1, 213, __pyx_L1_error))
7562  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
7563  if (__pyx_t_1) {
7564 
7565  /* "View.MemoryView":214
7566  * def __dealloc__(array self):
7567  * if self.callback_free_data != NULL:
7568  * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
7569  * elif self.free_data:
7570  * if self.dtype_is_object:
7571  */
7572  __Pyx_TraceLine(214,0,__PYX_ERR(1, 214, __pyx_L1_error))
7573  __pyx_v_self->callback_free_data(__pyx_v_self->data);
7574 
7575  /* "View.MemoryView":213
7576  *
7577  * def __dealloc__(array self):
7578  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
7579  * self.callback_free_data(self.data)
7580  * elif self.free_data:
7581  */
7582  goto __pyx_L3;
7583  }
7584 
7585  /* "View.MemoryView":215
7586  * if self.callback_free_data != NULL:
7587  * self.callback_free_data(self.data)
7588  * elif self.free_data: # <<<<<<<<<<<<<<
7589  * if self.dtype_is_object:
7590  * refcount_objects_in_slice(self.data, self._shape,
7591  */
7592  __Pyx_TraceLine(215,0,__PYX_ERR(1, 215, __pyx_L1_error))
7593  __pyx_t_1 = (__pyx_v_self->free_data != 0);
7594  if (__pyx_t_1) {
7595 
7596  /* "View.MemoryView":216
7597  * self.callback_free_data(self.data)
7598  * elif self.free_data:
7599  * if self.dtype_is_object: # <<<<<<<<<<<<<<
7600  * refcount_objects_in_slice(self.data, self._shape,
7601  * self._strides, self.ndim, False)
7602  */
7603  __Pyx_TraceLine(216,0,__PYX_ERR(1, 216, __pyx_L1_error))
7604  __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
7605  if (__pyx_t_1) {
7606 
7607  /* "View.MemoryView":217
7608  * elif self.free_data:
7609  * if self.dtype_is_object:
7610  * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<<
7611  * self._strides, self.ndim, False)
7612  * free(self.data)
7613  */
7614  __Pyx_TraceLine(217,0,__PYX_ERR(1, 217, __pyx_L1_error))
7615  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
7616 
7617  /* "View.MemoryView":216
7618  * self.callback_free_data(self.data)
7619  * elif self.free_data:
7620  * if self.dtype_is_object: # <<<<<<<<<<<<<<
7621  * refcount_objects_in_slice(self.data, self._shape,
7622  * self._strides, self.ndim, False)
7623  */
7624  }
7625 
7626  /* "View.MemoryView":219
7627  * refcount_objects_in_slice(self.data, self._shape,
7628  * self._strides, self.ndim, False)
7629  * free(self.data) # <<<<<<<<<<<<<<
7630  * PyObject_Free(self._shape)
7631  *
7632  */
7633  __Pyx_TraceLine(219,0,__PYX_ERR(1, 219, __pyx_L1_error))
7634  free(__pyx_v_self->data);
7635 
7636  /* "View.MemoryView":215
7637  * if self.callback_free_data != NULL:
7638  * self.callback_free_data(self.data)
7639  * elif self.free_data: # <<<<<<<<<<<<<<
7640  * if self.dtype_is_object:
7641  * refcount_objects_in_slice(self.data, self._shape,
7642  */
7643  }
7644  __pyx_L3:;
7645 
7646  /* "View.MemoryView":220
7647  * self._strides, self.ndim, False)
7648  * free(self.data)
7649  * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
7650  *
7651  * @property
7652  */
7653  __Pyx_TraceLine(220,0,__PYX_ERR(1, 220, __pyx_L1_error))
7654  PyObject_Free(__pyx_v_self->_shape);
7655 
7656  /* "View.MemoryView":212
7657  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
7658  *
7659  * def __dealloc__(array self): # <<<<<<<<<<<<<<
7660  * if self.callback_free_data != NULL:
7661  * self.callback_free_data(self.data)
7662  */
7663 
7664  /* function exit code */
7665  goto __pyx_L0;
7666  __pyx_L1_error:;
7667  __Pyx_WriteUnraisable("View.MemoryView.array.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
7668  __pyx_L0:;
7669  __Pyx_TraceReturn(Py_None, 0);
7670  __Pyx_RefNannyFinishContext();
7671 }
7672 
7673 /* "View.MemoryView":223
7674  *
7675  * @property
7676  * def memview(self): # <<<<<<<<<<<<<<
7677  * return self.get_memview()
7678  *
7679  */
7680 
7681 /* Python wrapper */
7682 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
7683 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
7684  PyObject *__pyx_r = 0;
7685  __Pyx_RefNannyDeclarations
7686  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7687  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
7688 
7689  /* function exit code */
7690  __Pyx_RefNannyFinishContext();
7691  return __pyx_r;
7692 }
7693 
7694 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
7695  PyObject *__pyx_r = NULL;
7696  __Pyx_TraceDeclarations
7697  __Pyx_RefNannyDeclarations
7698  PyObject *__pyx_t_1 = NULL;
7699  int __pyx_lineno = 0;
7700  const char *__pyx_filename = NULL;
7701  int __pyx_clineno = 0;
7702  __Pyx_RefNannySetupContext("__get__", 0);
7703  __Pyx_TraceCall("__get__", __pyx_f[1], 223, 0, __PYX_ERR(1, 223, __pyx_L1_error));
7704 
7705  /* "View.MemoryView":224
7706  * @property
7707  * def memview(self):
7708  * return self.get_memview() # <<<<<<<<<<<<<<
7709  *
7710  * @cname('get_memview')
7711  */
7712  __Pyx_TraceLine(224,0,__PYX_ERR(1, 224, __pyx_L1_error))
7713  __Pyx_XDECREF(__pyx_r);
7714  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error)
7715  __Pyx_GOTREF(__pyx_t_1);
7716  __pyx_r = __pyx_t_1;
7717  __pyx_t_1 = 0;
7718  goto __pyx_L0;
7719 
7720  /* "View.MemoryView":223
7721  *
7722  * @property
7723  * def memview(self): # <<<<<<<<<<<<<<
7724  * return self.get_memview()
7725  *
7726  */
7727 
7728  /* function exit code */
7729  __pyx_L1_error:;
7730  __Pyx_XDECREF(__pyx_t_1);
7731  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7732  __pyx_r = NULL;
7733  __pyx_L0:;
7734  __Pyx_XGIVEREF(__pyx_r);
7735  __Pyx_TraceReturn(__pyx_r, 0);
7736  __Pyx_RefNannyFinishContext();
7737  return __pyx_r;
7738 }
7739 
7740 /* "View.MemoryView":227
7741  *
7742  * @cname('get_memview')
7743  * cdef get_memview(self): # <<<<<<<<<<<<<<
7744  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
7745  * return memoryview(self, flags, self.dtype_is_object)
7746  */
7747 
7748 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
7749  int __pyx_v_flags;
7750  PyObject *__pyx_r = NULL;
7751  __Pyx_TraceDeclarations
7752  __Pyx_RefNannyDeclarations
7753  PyObject *__pyx_t_1 = NULL;
7754  PyObject *__pyx_t_2 = NULL;
7755  PyObject *__pyx_t_3 = NULL;
7756  int __pyx_lineno = 0;
7757  const char *__pyx_filename = NULL;
7758  int __pyx_clineno = 0;
7759  __Pyx_RefNannySetupContext("get_memview", 0);
7760  __Pyx_TraceCall("get_memview", __pyx_f[1], 227, 0, __PYX_ERR(1, 227, __pyx_L1_error));
7761 
7762  /* "View.MemoryView":228
7763  * @cname('get_memview')
7764  * cdef get_memview(self):
7765  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
7766  * return memoryview(self, flags, self.dtype_is_object)
7767  *
7768  */
7769  __Pyx_TraceLine(228,0,__PYX_ERR(1, 228, __pyx_L1_error))
7770  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
7771 
7772  /* "View.MemoryView":229
7773  * cdef get_memview(self):
7774  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
7775  * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
7776  *
7777  * def __len__(self):
7778  */
7779  __Pyx_TraceLine(229,0,__PYX_ERR(1, 229, __pyx_L1_error))
7780  __Pyx_XDECREF(__pyx_r);
7781  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
7782  __Pyx_GOTREF(__pyx_t_1);
7783  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
7784  __Pyx_GOTREF(__pyx_t_2);
7785  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 229, __pyx_L1_error)
7786  __Pyx_GOTREF(__pyx_t_3);
7787  __Pyx_INCREF(((PyObject *)__pyx_v_self));
7788  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7789  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
7790  __Pyx_GIVEREF(__pyx_t_1);
7791  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
7792  __Pyx_GIVEREF(__pyx_t_2);
7793  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
7794  __pyx_t_1 = 0;
7795  __pyx_t_2 = 0;
7796  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
7797  __Pyx_GOTREF(__pyx_t_2);
7798  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7799  __pyx_r = __pyx_t_2;
7800  __pyx_t_2 = 0;
7801  goto __pyx_L0;
7802 
7803  /* "View.MemoryView":227
7804  *
7805  * @cname('get_memview')
7806  * cdef get_memview(self): # <<<<<<<<<<<<<<
7807  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
7808  * return memoryview(self, flags, self.dtype_is_object)
7809  */
7810 
7811  /* function exit code */
7812  __pyx_L1_error:;
7813  __Pyx_XDECREF(__pyx_t_1);
7814  __Pyx_XDECREF(__pyx_t_2);
7815  __Pyx_XDECREF(__pyx_t_3);
7816  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
7817  __pyx_r = 0;
7818  __pyx_L0:;
7819  __Pyx_XGIVEREF(__pyx_r);
7820  __Pyx_TraceReturn(__pyx_r, 0);
7821  __Pyx_RefNannyFinishContext();
7822  return __pyx_r;
7823 }
7824 
7825 /* "View.MemoryView":231
7826  * return memoryview(self, flags, self.dtype_is_object)
7827  *
7828  * def __len__(self): # <<<<<<<<<<<<<<
7829  * return self._shape[0]
7830  *
7831  */
7832 
7833 /* Python wrapper */
7834 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
7835 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
7836  Py_ssize_t __pyx_r;
7837  __Pyx_RefNannyDeclarations
7838  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
7839  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
7840 
7841  /* function exit code */
7842  __Pyx_RefNannyFinishContext();
7843  return __pyx_r;
7844 }
7845 
7846 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
7847  Py_ssize_t __pyx_r;
7848  __Pyx_TraceDeclarations
7849  __Pyx_RefNannyDeclarations
7850  int __pyx_lineno = 0;
7851  const char *__pyx_filename = NULL;
7852  int __pyx_clineno = 0;
7853  __Pyx_RefNannySetupContext("__len__", 0);
7854  __Pyx_TraceCall("__len__", __pyx_f[1], 231, 0, __PYX_ERR(1, 231, __pyx_L1_error));
7855 
7856  /* "View.MemoryView":232
7857  *
7858  * def __len__(self):
7859  * return self._shape[0] # <<<<<<<<<<<<<<
7860  *
7861  * def __getattr__(self, attr):
7862  */
7863  __Pyx_TraceLine(232,0,__PYX_ERR(1, 232, __pyx_L1_error))
7864  __pyx_r = (__pyx_v_self->_shape[0]);
7865  goto __pyx_L0;
7866 
7867  /* "View.MemoryView":231
7868  * return memoryview(self, flags, self.dtype_is_object)
7869  *
7870  * def __len__(self): # <<<<<<<<<<<<<<
7871  * return self._shape[0]
7872  *
7873  */
7874 
7875  /* function exit code */
7876  __pyx_L1_error:;
7877  __Pyx_AddTraceback("View.MemoryView.array.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7878  __pyx_r = -1;
7879  __pyx_L0:;
7880  __Pyx_TraceReturn(Py_None, 0);
7881  __Pyx_RefNannyFinishContext();
7882  return __pyx_r;
7883 }
7884 
7885 /* "View.MemoryView":234
7886  * return self._shape[0]
7887  *
7888  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
7889  * return getattr(self.memview, attr)
7890  *
7891  */
7892 
7893 /* Python wrapper */
7894 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
7895 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
7896  PyObject *__pyx_r = 0;
7897  __Pyx_RefNannyDeclarations
7898  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
7899  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
7900 
7901  /* function exit code */
7902  __Pyx_RefNannyFinishContext();
7903  return __pyx_r;
7904 }
7905 
7906 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
7907  PyObject *__pyx_r = NULL;
7908  __Pyx_TraceDeclarations
7909  __Pyx_RefNannyDeclarations
7910  PyObject *__pyx_t_1 = NULL;
7911  PyObject *__pyx_t_2 = NULL;
7912  int __pyx_lineno = 0;
7913  const char *__pyx_filename = NULL;
7914  int __pyx_clineno = 0;
7915  __Pyx_RefNannySetupContext("__getattr__", 0);
7916  __Pyx_TraceCall("__getattr__", __pyx_f[1], 234, 0, __PYX_ERR(1, 234, __pyx_L1_error));
7917 
7918  /* "View.MemoryView":235
7919  *
7920  * def __getattr__(self, attr):
7921  * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
7922  *
7923  * def __getitem__(self, item):
7924  */
7925  __Pyx_TraceLine(235,0,__PYX_ERR(1, 235, __pyx_L1_error))
7926  __Pyx_XDECREF(__pyx_r);
7927  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
7928  __Pyx_GOTREF(__pyx_t_1);
7929  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error)
7930  __Pyx_GOTREF(__pyx_t_2);
7931  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7932  __pyx_r = __pyx_t_2;
7933  __pyx_t_2 = 0;
7934  goto __pyx_L0;
7935 
7936  /* "View.MemoryView":234
7937  * return self._shape[0]
7938  *
7939  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
7940  * return getattr(self.memview, attr)
7941  *
7942  */
7943 
7944  /* function exit code */
7945  __pyx_L1_error:;
7946  __Pyx_XDECREF(__pyx_t_1);
7947  __Pyx_XDECREF(__pyx_t_2);
7948  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7949  __pyx_r = NULL;
7950  __pyx_L0:;
7951  __Pyx_XGIVEREF(__pyx_r);
7952  __Pyx_TraceReturn(__pyx_r, 0);
7953  __Pyx_RefNannyFinishContext();
7954  return __pyx_r;
7955 }
7956 
7957 /* "View.MemoryView":237
7958  * return getattr(self.memview, attr)
7959  *
7960  * def __getitem__(self, item): # <<<<<<<<<<<<<<
7961  * return self.memview[item]
7962  *
7963  */
7964 
7965 /* Python wrapper */
7966 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
7967 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
7968  PyObject *__pyx_r = 0;
7969  __Pyx_RefNannyDeclarations
7970  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7971  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
7972 
7973  /* function exit code */
7974  __Pyx_RefNannyFinishContext();
7975  return __pyx_r;
7976 }
7977 
7978 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
7979  PyObject *__pyx_r = NULL;
7980  __Pyx_TraceDeclarations
7981  __Pyx_RefNannyDeclarations
7982  PyObject *__pyx_t_1 = NULL;
7983  PyObject *__pyx_t_2 = NULL;
7984  int __pyx_lineno = 0;
7985  const char *__pyx_filename = NULL;
7986  int __pyx_clineno = 0;
7987  __Pyx_RefNannySetupContext("__getitem__", 0);
7988  __Pyx_TraceCall("__getitem__", __pyx_f[1], 237, 0, __PYX_ERR(1, 237, __pyx_L1_error));
7989 
7990  /* "View.MemoryView":238
7991  *
7992  * def __getitem__(self, item):
7993  * return self.memview[item] # <<<<<<<<<<<<<<
7994  *
7995  * def __setitem__(self, item, value):
7996  */
7997  __Pyx_TraceLine(238,0,__PYX_ERR(1, 238, __pyx_L1_error))
7998  __Pyx_XDECREF(__pyx_r);
7999  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
8000  __Pyx_GOTREF(__pyx_t_1);
8001  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 238, __pyx_L1_error)
8002  __Pyx_GOTREF(__pyx_t_2);
8003  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8004  __pyx_r = __pyx_t_2;
8005  __pyx_t_2 = 0;
8006  goto __pyx_L0;
8007 
8008  /* "View.MemoryView":237
8009  * return getattr(self.memview, attr)
8010  *
8011  * def __getitem__(self, item): # <<<<<<<<<<<<<<
8012  * return self.memview[item]
8013  *
8014  */
8015 
8016  /* function exit code */
8017  __pyx_L1_error:;
8018  __Pyx_XDECREF(__pyx_t_1);
8019  __Pyx_XDECREF(__pyx_t_2);
8020  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8021  __pyx_r = NULL;
8022  __pyx_L0:;
8023  __Pyx_XGIVEREF(__pyx_r);
8024  __Pyx_TraceReturn(__pyx_r, 0);
8025  __Pyx_RefNannyFinishContext();
8026  return __pyx_r;
8027 }
8028 
8029 /* "View.MemoryView":240
8030  * return self.memview[item]
8031  *
8032  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
8033  * self.memview[item] = value
8034  *
8035  */
8036 
8037 /* Python wrapper */
8038 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
8039 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
8040  int __pyx_r;
8041  __Pyx_RefNannyDeclarations
8042  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
8043  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
8044 
8045  /* function exit code */
8046  __Pyx_RefNannyFinishContext();
8047  return __pyx_r;
8048 }
8049 
8050 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
8051  int __pyx_r;
8052  __Pyx_TraceDeclarations
8053  __Pyx_RefNannyDeclarations
8054  PyObject *__pyx_t_1 = NULL;
8055  int __pyx_lineno = 0;
8056  const char *__pyx_filename = NULL;
8057  int __pyx_clineno = 0;
8058  __Pyx_RefNannySetupContext("__setitem__", 0);
8059  __Pyx_TraceCall("__setitem__", __pyx_f[1], 240, 0, __PYX_ERR(1, 240, __pyx_L1_error));
8060 
8061  /* "View.MemoryView":241
8062  *
8063  * def __setitem__(self, item, value):
8064  * self.memview[item] = value # <<<<<<<<<<<<<<
8065  *
8066  *
8067  */
8068  __Pyx_TraceLine(241,0,__PYX_ERR(1, 241, __pyx_L1_error))
8069  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 241, __pyx_L1_error)
8070  __Pyx_GOTREF(__pyx_t_1);
8071  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(1, 241, __pyx_L1_error)
8072  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8073 
8074  /* "View.MemoryView":240
8075  * return self.memview[item]
8076  *
8077  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
8078  * self.memview[item] = value
8079  *
8080  */
8081 
8082  /* function exit code */
8083  __pyx_r = 0;
8084  goto __pyx_L0;
8085  __pyx_L1_error:;
8086  __Pyx_XDECREF(__pyx_t_1);
8087  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8088  __pyx_r = -1;
8089  __pyx_L0:;
8090  __Pyx_TraceReturn(Py_None, 0);
8091  __Pyx_RefNannyFinishContext();
8092  return __pyx_r;
8093 }
8094 
8095 /* "(tree fragment)":1
8096  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8097  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8098  * def __setstate_cython__(self, __pyx_state):
8099  */
8100 
8101 /* Python wrapper */
8102 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8103 static PyMethodDef __pyx_mdef___pyx_array_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0};
8104 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8105  PyObject *__pyx_r = 0;
8106  __Pyx_RefNannyDeclarations
8107  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
8108  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
8109 
8110  /* function exit code */
8111  __Pyx_RefNannyFinishContext();
8112  return __pyx_r;
8113 }
8114 
8115 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
8116  PyObject *__pyx_r = NULL;
8117  __Pyx_TraceDeclarations
8118  __Pyx_RefNannyDeclarations
8119  PyObject *__pyx_t_1 = NULL;
8120  int __pyx_lineno = 0;
8121  const char *__pyx_filename = NULL;
8122  int __pyx_clineno = 0;
8123  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
8124  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
8125 
8126  /* "(tree fragment)":2
8127  * def __reduce_cython__(self):
8128  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
8129  * def __setstate_cython__(self, __pyx_state):
8130  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8131  */
8132  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
8133  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
8134  __Pyx_GOTREF(__pyx_t_1);
8135  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8136  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8137  __PYX_ERR(1, 2, __pyx_L1_error)
8138 
8139  /* "(tree fragment)":1
8140  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8141  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8142  * def __setstate_cython__(self, __pyx_state):
8143  */
8144 
8145  /* function exit code */
8146  __pyx_L1_error:;
8147  __Pyx_XDECREF(__pyx_t_1);
8148  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8149  __pyx_r = NULL;
8150  __Pyx_XGIVEREF(__pyx_r);
8151  __Pyx_TraceReturn(__pyx_r, 0);
8152  __Pyx_RefNannyFinishContext();
8153  return __pyx_r;
8154 }
8155 
8156 /* "(tree fragment)":3
8157  * def __reduce_cython__(self):
8158  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8159  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8160  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8161  */
8162 
8163 /* Python wrapper */
8164 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
8165 static PyMethodDef __pyx_mdef___pyx_array_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0};
8166 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
8167  PyObject *__pyx_r = 0;
8168  __Pyx_RefNannyDeclarations
8169  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
8170  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
8171 
8172  /* function exit code */
8173  __Pyx_RefNannyFinishContext();
8174  return __pyx_r;
8175 }
8176 
8177 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
8178  PyObject *__pyx_r = NULL;
8179  __Pyx_TraceDeclarations
8180  __Pyx_RefNannyDeclarations
8181  PyObject *__pyx_t_1 = NULL;
8182  int __pyx_lineno = 0;
8183  const char *__pyx_filename = NULL;
8184  int __pyx_clineno = 0;
8185  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
8186  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
8187 
8188  /* "(tree fragment)":4
8189  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8190  * def __setstate_cython__(self, __pyx_state):
8191  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
8192  */
8193  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
8194  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
8195  __Pyx_GOTREF(__pyx_t_1);
8196  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
8197  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8198  __PYX_ERR(1, 4, __pyx_L1_error)
8199 
8200  /* "(tree fragment)":3
8201  * def __reduce_cython__(self):
8202  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8203  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8204  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
8205  */
8206 
8207  /* function exit code */
8208  __pyx_L1_error:;
8209  __Pyx_XDECREF(__pyx_t_1);
8210  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8211  __pyx_r = NULL;
8212  __Pyx_XGIVEREF(__pyx_r);
8213  __Pyx_TraceReturn(__pyx_r, 0);
8214  __Pyx_RefNannyFinishContext();
8215  return __pyx_r;
8216 }
8217 
8218 /* "View.MemoryView":245
8219  *
8220  * @cname("__pyx_array_new")
8221  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
8222  * char *mode, char *buf):
8223  * cdef array result
8224  */
8225 
8226 static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
8227  struct __pyx_array_obj *__pyx_v_result = 0;
8228  struct __pyx_array_obj *__pyx_r = NULL;
8229  __Pyx_TraceDeclarations
8230  __Pyx_RefNannyDeclarations
8231  int __pyx_t_1;
8232  PyObject *__pyx_t_2 = NULL;
8233  PyObject *__pyx_t_3 = NULL;
8234  PyObject *__pyx_t_4 = NULL;
8235  PyObject *__pyx_t_5 = NULL;
8236  int __pyx_lineno = 0;
8237  const char *__pyx_filename = NULL;
8238  int __pyx_clineno = 0;
8239  __Pyx_RefNannySetupContext("array_cwrapper", 0);
8240  __Pyx_TraceCall("array_cwrapper", __pyx_f[1], 245, 0, __PYX_ERR(1, 245, __pyx_L1_error));
8241 
8242  /* "View.MemoryView":249
8243  * cdef array result
8244  *
8245  * if buf == NULL: # <<<<<<<<<<<<<<
8246  * result = array(shape, itemsize, format, mode.decode('ASCII'))
8247  * else:
8248  */
8249  __Pyx_TraceLine(249,0,__PYX_ERR(1, 249, __pyx_L1_error))
8250  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
8251  if (__pyx_t_1) {
8252 
8253  /* "View.MemoryView":250
8254  *
8255  * if buf == NULL:
8256  * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<<
8257  * else:
8258  * result = array(shape, itemsize, format, mode.decode('ASCII'),
8259  */
8260  __Pyx_TraceLine(250,0,__PYX_ERR(1, 250, __pyx_L1_error))
8261  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 250, __pyx_L1_error)
8262  __Pyx_GOTREF(__pyx_t_2);
8263  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 250, __pyx_L1_error)
8264  __Pyx_GOTREF(__pyx_t_3);
8265  __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 250, __pyx_L1_error)
8266  __Pyx_GOTREF(__pyx_t_4);
8267  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 250, __pyx_L1_error)
8268  __Pyx_GOTREF(__pyx_t_5);
8269  __Pyx_INCREF(__pyx_v_shape);
8270  __Pyx_GIVEREF(__pyx_v_shape);
8271  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
8272  __Pyx_GIVEREF(__pyx_t_2);
8273  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
8274  __Pyx_GIVEREF(__pyx_t_3);
8275  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
8276  __Pyx_GIVEREF(__pyx_t_4);
8277  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
8278  __pyx_t_2 = 0;
8279  __pyx_t_3 = 0;
8280  __pyx_t_4 = 0;
8281  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 250, __pyx_L1_error)
8282  __Pyx_GOTREF(__pyx_t_4);
8283  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8284  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
8285  __pyx_t_4 = 0;
8286 
8287  /* "View.MemoryView":249
8288  * cdef array result
8289  *
8290  * if buf == NULL: # <<<<<<<<<<<<<<
8291  * result = array(shape, itemsize, format, mode.decode('ASCII'))
8292  * else:
8293  */
8294  goto __pyx_L3;
8295  }
8296 
8297  /* "View.MemoryView":252
8298  * result = array(shape, itemsize, format, mode.decode('ASCII'))
8299  * else:
8300  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
8301  * allocate_buffer=False)
8302  * result.data = buf
8303  */
8304  __Pyx_TraceLine(252,0,__PYX_ERR(1, 252, __pyx_L1_error))
8305  /*else*/ {
8306  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 252, __pyx_L1_error)
8307  __Pyx_GOTREF(__pyx_t_4);
8308  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error)
8309  __Pyx_GOTREF(__pyx_t_5);
8310  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error)
8311  __Pyx_GOTREF(__pyx_t_3);
8312  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 252, __pyx_L1_error)
8313  __Pyx_GOTREF(__pyx_t_2);
8314  __Pyx_INCREF(__pyx_v_shape);
8315  __Pyx_GIVEREF(__pyx_v_shape);
8316  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
8317  __Pyx_GIVEREF(__pyx_t_4);
8318  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
8319  __Pyx_GIVEREF(__pyx_t_5);
8320  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
8321  __Pyx_GIVEREF(__pyx_t_3);
8322  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
8323  __pyx_t_4 = 0;
8324  __pyx_t_5 = 0;
8325  __pyx_t_3 = 0;
8326 
8327  /* "View.MemoryView":253
8328  * else:
8329  * result = array(shape, itemsize, format, mode.decode('ASCII'),
8330  * allocate_buffer=False) # <<<<<<<<<<<<<<
8331  * result.data = buf
8332  *
8333  */
8334  __Pyx_TraceLine(253,0,__PYX_ERR(1, 253, __pyx_L1_error))
8335  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 253, __pyx_L1_error)
8336  __Pyx_GOTREF(__pyx_t_3);
8337  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 253, __pyx_L1_error)
8338 
8339  /* "View.MemoryView":252
8340  * result = array(shape, itemsize, format, mode.decode('ASCII'))
8341  * else:
8342  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
8343  * allocate_buffer=False)
8344  * result.data = buf
8345  */
8346  __Pyx_TraceLine(252,0,__PYX_ERR(1, 252, __pyx_L1_error))
8347  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error)
8348  __Pyx_GOTREF(__pyx_t_5);
8349  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8350  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8351  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
8352  __pyx_t_5 = 0;
8353 
8354  /* "View.MemoryView":254
8355  * result = array(shape, itemsize, format, mode.decode('ASCII'),
8356  * allocate_buffer=False)
8357  * result.data = buf # <<<<<<<<<<<<<<
8358  *
8359  * return result
8360  */
8361  __Pyx_TraceLine(254,0,__PYX_ERR(1, 254, __pyx_L1_error))
8362  __pyx_v_result->data = __pyx_v_buf;
8363  }
8364  __pyx_L3:;
8365 
8366  /* "View.MemoryView":256
8367  * result.data = buf
8368  *
8369  * return result # <<<<<<<<<<<<<<
8370  *
8371  *
8372  */
8373  __Pyx_TraceLine(256,0,__PYX_ERR(1, 256, __pyx_L1_error))
8374  __Pyx_XDECREF(((PyObject *)__pyx_r));
8375  __Pyx_INCREF(((PyObject *)__pyx_v_result));
8376  __pyx_r = __pyx_v_result;
8377  goto __pyx_L0;
8378 
8379  /* "View.MemoryView":245
8380  *
8381  * @cname("__pyx_array_new")
8382  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
8383  * char *mode, char *buf):
8384  * cdef array result
8385  */
8386 
8387  /* function exit code */
8388  __pyx_L1_error:;
8389  __Pyx_XDECREF(__pyx_t_2);
8390  __Pyx_XDECREF(__pyx_t_3);
8391  __Pyx_XDECREF(__pyx_t_4);
8392  __Pyx_XDECREF(__pyx_t_5);
8393  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
8394  __pyx_r = 0;
8395  __pyx_L0:;
8396  __Pyx_XDECREF((PyObject *)__pyx_v_result);
8397  __Pyx_XGIVEREF((PyObject *)__pyx_r);
8398  __Pyx_TraceReturn(__pyx_r, 0);
8399  __Pyx_RefNannyFinishContext();
8400  return __pyx_r;
8401 }
8402 
8403 /* "View.MemoryView":282
8404  * cdef class Enum(object):
8405  * cdef object name
8406  * def __init__(self, name): # <<<<<<<<<<<<<<
8407  * self.name = name
8408  * def __repr__(self):
8409  */
8410 
8411 /* Python wrapper */
8412 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8413 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8414  PyObject *__pyx_v_name = 0;
8415  int __pyx_lineno = 0;
8416  const char *__pyx_filename = NULL;
8417  int __pyx_clineno = 0;
8418  int __pyx_r;
8419  __Pyx_RefNannyDeclarations
8420  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
8421  {
8422  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
8423  PyObject* values[1] = {0};
8424  if (unlikely(__pyx_kwds)) {
8425  Py_ssize_t kw_args;
8426  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8427  switch (pos_args) {
8428  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8429  CYTHON_FALLTHROUGH;
8430  case 0: break;
8431  default: goto __pyx_L5_argtuple_error;
8432  }
8433  kw_args = PyDict_Size(__pyx_kwds);
8434  switch (pos_args) {
8435  case 0:
8436  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
8437  else goto __pyx_L5_argtuple_error;
8438  }
8439  if (unlikely(kw_args > 0)) {
8440  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 282, __pyx_L3_error)
8441  }
8442  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
8443  goto __pyx_L5_argtuple_error;
8444  } else {
8445  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8446  }
8447  __pyx_v_name = values[0];
8448  }
8449  goto __pyx_L4_argument_unpacking_done;
8450  __pyx_L5_argtuple_error:;
8451  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 282, __pyx_L3_error)
8452  __pyx_L3_error:;
8453  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8454  __Pyx_RefNannyFinishContext();
8455  return -1;
8456  __pyx_L4_argument_unpacking_done:;
8457  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
8458 
8459  /* function exit code */
8460  __Pyx_RefNannyFinishContext();
8461  return __pyx_r;
8462 }
8463 
8464 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
8465  int __pyx_r;
8466  __Pyx_TraceDeclarations
8467  __Pyx_RefNannyDeclarations
8468  int __pyx_lineno = 0;
8469  const char *__pyx_filename = NULL;
8470  int __pyx_clineno = 0;
8471  __Pyx_RefNannySetupContext("__init__", 0);
8472  __Pyx_TraceCall("__init__", __pyx_f[1], 282, 0, __PYX_ERR(1, 282, __pyx_L1_error));
8473 
8474  /* "View.MemoryView":283
8475  * cdef object name
8476  * def __init__(self, name):
8477  * self.name = name # <<<<<<<<<<<<<<
8478  * def __repr__(self):
8479  * return self.name
8480  */
8481  __Pyx_TraceLine(283,0,__PYX_ERR(1, 283, __pyx_L1_error))
8482  __Pyx_INCREF(__pyx_v_name);
8483  __Pyx_GIVEREF(__pyx_v_name);
8484  __Pyx_GOTREF(__pyx_v_self->name);
8485  __Pyx_DECREF(__pyx_v_self->name);
8486  __pyx_v_self->name = __pyx_v_name;
8487 
8488  /* "View.MemoryView":282
8489  * cdef class Enum(object):
8490  * cdef object name
8491  * def __init__(self, name): # <<<<<<<<<<<<<<
8492  * self.name = name
8493  * def __repr__(self):
8494  */
8495 
8496  /* function exit code */
8497  __pyx_r = 0;
8498  goto __pyx_L0;
8499  __pyx_L1_error:;
8500  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8501  __pyx_r = -1;
8502  __pyx_L0:;
8503  __Pyx_TraceReturn(Py_None, 0);
8504  __Pyx_RefNannyFinishContext();
8505  return __pyx_r;
8506 }
8507 
8508 /* "View.MemoryView":284
8509  * def __init__(self, name):
8510  * self.name = name
8511  * def __repr__(self): # <<<<<<<<<<<<<<
8512  * return self.name
8513  *
8514  */
8515 
8516 /* Python wrapper */
8517 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
8518 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
8519  PyObject *__pyx_r = 0;
8520  __Pyx_RefNannyDeclarations
8521  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
8522  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
8523 
8524  /* function exit code */
8525  __Pyx_RefNannyFinishContext();
8526  return __pyx_r;
8527 }
8528 
8529 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
8530  PyObject *__pyx_r = NULL;
8531  __Pyx_TraceDeclarations
8532  __Pyx_RefNannyDeclarations
8533  int __pyx_lineno = 0;
8534  const char *__pyx_filename = NULL;
8535  int __pyx_clineno = 0;
8536  __Pyx_RefNannySetupContext("__repr__", 0);
8537  __Pyx_TraceCall("__repr__", __pyx_f[1], 284, 0, __PYX_ERR(1, 284, __pyx_L1_error));
8538 
8539  /* "View.MemoryView":285
8540  * self.name = name
8541  * def __repr__(self):
8542  * return self.name # <<<<<<<<<<<<<<
8543  *
8544  * cdef generic = Enum("<strided and direct or indirect>")
8545  */
8546  __Pyx_TraceLine(285,0,__PYX_ERR(1, 285, __pyx_L1_error))
8547  __Pyx_XDECREF(__pyx_r);
8548  __Pyx_INCREF(__pyx_v_self->name);
8549  __pyx_r = __pyx_v_self->name;
8550  goto __pyx_L0;
8551 
8552  /* "View.MemoryView":284
8553  * def __init__(self, name):
8554  * self.name = name
8555  * def __repr__(self): # <<<<<<<<<<<<<<
8556  * return self.name
8557  *
8558  */
8559 
8560  /* function exit code */
8561  __pyx_L1_error:;
8562  __Pyx_AddTraceback("View.MemoryView.Enum.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8563  __pyx_r = NULL;
8564  __pyx_L0:;
8565  __Pyx_XGIVEREF(__pyx_r);
8566  __Pyx_TraceReturn(__pyx_r, 0);
8567  __Pyx_RefNannyFinishContext();
8568  return __pyx_r;
8569 }
8570 
8571 /* "(tree fragment)":1
8572  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8573  * cdef tuple state
8574  * cdef object _dict
8575  */
8576 
8577 /* Python wrapper */
8578 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8579 static PyMethodDef __pyx_mdef___pyx_MemviewEnum_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0};
8580 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8581  PyObject *__pyx_r = 0;
8582  __Pyx_RefNannyDeclarations
8583  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
8584  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
8585 
8586  /* function exit code */
8587  __Pyx_RefNannyFinishContext();
8588  return __pyx_r;
8589 }
8590 
8591 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
8592  PyObject *__pyx_v_state = 0;
8593  PyObject *__pyx_v__dict = 0;
8594  int __pyx_v_use_setstate;
8595  PyObject *__pyx_r = NULL;
8596  __Pyx_TraceDeclarations
8597  __Pyx_RefNannyDeclarations
8598  PyObject *__pyx_t_1 = NULL;
8599  int __pyx_t_2;
8600  int __pyx_t_3;
8601  PyObject *__pyx_t_4 = NULL;
8602  PyObject *__pyx_t_5 = NULL;
8603  int __pyx_lineno = 0;
8604  const char *__pyx_filename = NULL;
8605  int __pyx_clineno = 0;
8606  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
8607  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
8608 
8609  /* "(tree fragment)":5
8610  * cdef object _dict
8611  * cdef bint use_setstate
8612  * state = (self.name,) # <<<<<<<<<<<<<<
8613  * _dict = getattr(self, '__dict__', None)
8614  * if _dict is not None:
8615  */
8616  __Pyx_TraceLine(5,0,__PYX_ERR(1, 5, __pyx_L1_error))
8617  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
8618  __Pyx_GOTREF(__pyx_t_1);
8619  __Pyx_INCREF(__pyx_v_self->name);
8620  __Pyx_GIVEREF(__pyx_v_self->name);
8621  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
8622  __pyx_v_state = ((PyObject*)__pyx_t_1);
8623  __pyx_t_1 = 0;
8624 
8625  /* "(tree fragment)":6
8626  * cdef bint use_setstate
8627  * state = (self.name,)
8628  * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
8629  * if _dict is not None:
8630  * state += (_dict,)
8631  */
8632  __Pyx_TraceLine(6,0,__PYX_ERR(1, 6, __pyx_L1_error))
8633  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
8634  __Pyx_GOTREF(__pyx_t_1);
8635  __pyx_v__dict = __pyx_t_1;
8636  __pyx_t_1 = 0;
8637 
8638  /* "(tree fragment)":7
8639  * state = (self.name,)
8640  * _dict = getattr(self, '__dict__', None)
8641  * if _dict is not None: # <<<<<<<<<<<<<<
8642  * state += (_dict,)
8643  * use_setstate = True
8644  */
8645  __Pyx_TraceLine(7,0,__PYX_ERR(1, 7, __pyx_L1_error))
8646  __pyx_t_2 = (__pyx_v__dict != Py_None);
8647  __pyx_t_3 = (__pyx_t_2 != 0);
8648  if (__pyx_t_3) {
8649 
8650  /* "(tree fragment)":8
8651  * _dict = getattr(self, '__dict__', None)
8652  * if _dict is not None:
8653  * state += (_dict,) # <<<<<<<<<<<<<<
8654  * use_setstate = True
8655  * else:
8656  */
8657  __Pyx_TraceLine(8,0,__PYX_ERR(1, 8, __pyx_L1_error))
8658  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
8659  __Pyx_GOTREF(__pyx_t_1);
8660  __Pyx_INCREF(__pyx_v__dict);
8661  __Pyx_GIVEREF(__pyx_v__dict);
8662  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
8663  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
8664  __Pyx_GOTREF(__pyx_t_4);
8665  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8666  __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
8667  __pyx_t_4 = 0;
8668 
8669  /* "(tree fragment)":9
8670  * if _dict is not None:
8671  * state += (_dict,)
8672  * use_setstate = True # <<<<<<<<<<<<<<
8673  * else:
8674  * use_setstate = self.name is not None
8675  */
8676  __Pyx_TraceLine(9,0,__PYX_ERR(1, 9, __pyx_L1_error))
8677  __pyx_v_use_setstate = 1;
8678 
8679  /* "(tree fragment)":7
8680  * state = (self.name,)
8681  * _dict = getattr(self, '__dict__', None)
8682  * if _dict is not None: # <<<<<<<<<<<<<<
8683  * state += (_dict,)
8684  * use_setstate = True
8685  */
8686  goto __pyx_L3;
8687  }
8688 
8689  /* "(tree fragment)":11
8690  * use_setstate = True
8691  * else:
8692  * use_setstate = self.name is not None # <<<<<<<<<<<<<<
8693  * if use_setstate:
8694  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
8695  */
8696  __Pyx_TraceLine(11,0,__PYX_ERR(1, 11, __pyx_L1_error))
8697  /*else*/ {
8698  __pyx_t_3 = (__pyx_v_self->name != Py_None);
8699  __pyx_v_use_setstate = __pyx_t_3;
8700  }
8701  __pyx_L3:;
8702 
8703  /* "(tree fragment)":12
8704  * else:
8705  * use_setstate = self.name is not None
8706  * if use_setstate: # <<<<<<<<<<<<<<
8707  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
8708  * else:
8709  */
8710  __Pyx_TraceLine(12,0,__PYX_ERR(1, 12, __pyx_L1_error))
8711  __pyx_t_3 = (__pyx_v_use_setstate != 0);
8712  if (__pyx_t_3) {
8713 
8714  /* "(tree fragment)":13
8715  * use_setstate = self.name is not None
8716  * if use_setstate:
8717  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<<
8718  * else:
8719  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
8720  */
8721  __Pyx_TraceLine(13,0,__PYX_ERR(1, 13, __pyx_L1_error))
8722  __Pyx_XDECREF(__pyx_r);
8723  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
8724  __Pyx_GOTREF(__pyx_t_4);
8725  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
8726  __Pyx_GOTREF(__pyx_t_1);
8727  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8728  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8729  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8730  __Pyx_INCREF(__pyx_int_184977713);
8731  __Pyx_GIVEREF(__pyx_int_184977713);
8732  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
8733  __Pyx_INCREF(Py_None);
8734  __Pyx_GIVEREF(Py_None);
8735  PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
8736  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
8737  __Pyx_GOTREF(__pyx_t_5);
8738  __Pyx_GIVEREF(__pyx_t_4);
8739  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
8740  __Pyx_GIVEREF(__pyx_t_1);
8741  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
8742  __Pyx_INCREF(__pyx_v_state);
8743  __Pyx_GIVEREF(__pyx_v_state);
8744  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
8745  __pyx_t_4 = 0;
8746  __pyx_t_1 = 0;
8747  __pyx_r = __pyx_t_5;
8748  __pyx_t_5 = 0;
8749  goto __pyx_L0;
8750 
8751  /* "(tree fragment)":12
8752  * else:
8753  * use_setstate = self.name is not None
8754  * if use_setstate: # <<<<<<<<<<<<<<
8755  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
8756  * else:
8757  */
8758  }
8759 
8760  /* "(tree fragment)":15
8761  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
8762  * else:
8763  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<<
8764  * def __setstate_cython__(self, __pyx_state):
8765  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
8766  */
8767  __Pyx_TraceLine(15,0,__PYX_ERR(1, 15, __pyx_L1_error))
8768  /*else*/ {
8769  __Pyx_XDECREF(__pyx_r);
8770  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
8771  __Pyx_GOTREF(__pyx_t_5);
8772  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
8773  __Pyx_GOTREF(__pyx_t_1);
8774  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8775  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8776  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
8777  __Pyx_INCREF(__pyx_int_184977713);
8778  __Pyx_GIVEREF(__pyx_int_184977713);
8779  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
8780  __Pyx_INCREF(__pyx_v_state);
8781  __Pyx_GIVEREF(__pyx_v_state);
8782  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
8783  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
8784  __Pyx_GOTREF(__pyx_t_4);
8785  __Pyx_GIVEREF(__pyx_t_5);
8786  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
8787  __Pyx_GIVEREF(__pyx_t_1);
8788  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
8789  __pyx_t_5 = 0;
8790  __pyx_t_1 = 0;
8791  __pyx_r = __pyx_t_4;
8792  __pyx_t_4 = 0;
8793  goto __pyx_L0;
8794  }
8795 
8796  /* "(tree fragment)":1
8797  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
8798  * cdef tuple state
8799  * cdef object _dict
8800  */
8801 
8802  /* function exit code */
8803  __pyx_L1_error:;
8804  __Pyx_XDECREF(__pyx_t_1);
8805  __Pyx_XDECREF(__pyx_t_4);
8806  __Pyx_XDECREF(__pyx_t_5);
8807  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8808  __pyx_r = NULL;
8809  __pyx_L0:;
8810  __Pyx_XDECREF(__pyx_v_state);
8811  __Pyx_XDECREF(__pyx_v__dict);
8812  __Pyx_XGIVEREF(__pyx_r);
8813  __Pyx_TraceReturn(__pyx_r, 0);
8814  __Pyx_RefNannyFinishContext();
8815  return __pyx_r;
8816 }
8817 
8818 /* "(tree fragment)":16
8819  * else:
8820  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
8821  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8822  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
8823  */
8824 
8825 /* Python wrapper */
8826 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
8827 static PyMethodDef __pyx_mdef___pyx_MemviewEnum_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0};
8828 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
8829  PyObject *__pyx_r = 0;
8830  __Pyx_RefNannyDeclarations
8831  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
8832  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
8833 
8834  /* function exit code */
8835  __Pyx_RefNannyFinishContext();
8836  return __pyx_r;
8837 }
8838 
8839 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
8840  PyObject *__pyx_r = NULL;
8841  __Pyx_TraceDeclarations
8842  __Pyx_RefNannyDeclarations
8843  PyObject *__pyx_t_1 = NULL;
8844  int __pyx_lineno = 0;
8845  const char *__pyx_filename = NULL;
8846  int __pyx_clineno = 0;
8847  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
8848  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
8849 
8850  /* "(tree fragment)":17
8851  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
8852  * def __setstate_cython__(self, __pyx_state):
8853  * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
8854  */
8855  __Pyx_TraceLine(17,0,__PYX_ERR(1, 17, __pyx_L1_error))
8856  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
8857  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
8858  __Pyx_GOTREF(__pyx_t_1);
8859  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8860 
8861  /* "(tree fragment)":16
8862  * else:
8863  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
8864  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
8865  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
8866  */
8867 
8868  /* function exit code */
8869  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8870  goto __pyx_L0;
8871  __pyx_L1_error:;
8872  __Pyx_XDECREF(__pyx_t_1);
8873  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8874  __pyx_r = NULL;
8875  __pyx_L0:;
8876  __Pyx_XGIVEREF(__pyx_r);
8877  __Pyx_TraceReturn(__pyx_r, 0);
8878  __Pyx_RefNannyFinishContext();
8879  return __pyx_r;
8880 }
8881 
8882 /* "View.MemoryView":299
8883  *
8884  * @cname('__pyx_align_pointer')
8885  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
8886  * "Align pointer memory on a given boundary"
8887  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
8888  */
8889 
8890 static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
8891  Py_intptr_t __pyx_v_aligned_p;
8892  size_t __pyx_v_offset;
8893  void *__pyx_r;
8894  __Pyx_TraceDeclarations
8895  int __pyx_t_1;
8896  int __pyx_lineno = 0;
8897  const char *__pyx_filename = NULL;
8898  int __pyx_clineno = 0;
8899  __Pyx_TraceCall("align_pointer", __pyx_f[1], 299, 1, __PYX_ERR(1, 299, __pyx_L1_error));
8900 
8901  /* "View.MemoryView":301
8902  * cdef void *align_pointer(void *memory, size_t alignment) nogil:
8903  * "Align pointer memory on a given boundary"
8904  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory # <<<<<<<<<<<<<<
8905  * cdef size_t offset
8906  *
8907  */
8908  __Pyx_TraceLine(301,1,__PYX_ERR(1, 301, __pyx_L1_error))
8909  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
8910 
8911  /* "View.MemoryView":305
8912  *
8913  * with cython.cdivision(True):
8914  * offset = aligned_p % alignment # <<<<<<<<<<<<<<
8915  *
8916  * if offset > 0:
8917  */
8918  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
8919 
8920  /* "View.MemoryView":307
8921  * offset = aligned_p % alignment
8922  *
8923  * if offset > 0: # <<<<<<<<<<<<<<
8924  * aligned_p += alignment - offset
8925  *
8926  */
8927  __Pyx_TraceLine(307,1,__PYX_ERR(1, 307, __pyx_L1_error))
8928  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
8929  if (__pyx_t_1) {
8930 
8931  /* "View.MemoryView":308
8932  *
8933  * if offset > 0:
8934  * aligned_p += alignment - offset # <<<<<<<<<<<<<<
8935  *
8936  * return <void *> aligned_p
8937  */
8938  __Pyx_TraceLine(308,1,__PYX_ERR(1, 308, __pyx_L1_error))
8939  __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
8940 
8941  /* "View.MemoryView":307
8942  * offset = aligned_p % alignment
8943  *
8944  * if offset > 0: # <<<<<<<<<<<<<<
8945  * aligned_p += alignment - offset
8946  *
8947  */
8948  }
8949 
8950  /* "View.MemoryView":310
8951  * aligned_p += alignment - offset
8952  *
8953  * return <void *> aligned_p # <<<<<<<<<<<<<<
8954  *
8955  *
8956  */
8957  __Pyx_TraceLine(310,1,__PYX_ERR(1, 310, __pyx_L1_error))
8958  __pyx_r = ((void *)__pyx_v_aligned_p);
8959  goto __pyx_L0;
8960 
8961  /* "View.MemoryView":299
8962  *
8963  * @cname('__pyx_align_pointer')
8964  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
8965  * "Align pointer memory on a given boundary"
8966  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
8967  */
8968 
8969  /* function exit code */
8970  __pyx_L1_error:;
8971  __Pyx_WriteUnraisable("View.MemoryView.align_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
8972  __pyx_r = 0;
8973  __pyx_L0:;
8974  __Pyx_TraceReturn(Py_None, 1);
8975  return __pyx_r;
8976 }
8977 
8978 /* "View.MemoryView":346
8979  * cdef __Pyx_TypeInfo *typeinfo
8980  *
8981  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
8982  * self.obj = obj
8983  * self.flags = flags
8984  */
8985 
8986 /* Python wrapper */
8987 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8988 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8989  PyObject *__pyx_v_obj = 0;
8990  int __pyx_v_flags;
8991  int __pyx_v_dtype_is_object;
8992  int __pyx_lineno = 0;
8993  const char *__pyx_filename = NULL;
8994  int __pyx_clineno = 0;
8995  int __pyx_r;
8996  __Pyx_RefNannyDeclarations
8997  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
8998  {
8999  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
9000  PyObject* values[3] = {0,0,0};
9001  if (unlikely(__pyx_kwds)) {
9002  Py_ssize_t kw_args;
9003  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9004  switch (pos_args) {
9005  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9006  CYTHON_FALLTHROUGH;
9007  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9008  CYTHON_FALLTHROUGH;
9009  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9010  CYTHON_FALLTHROUGH;
9011  case 0: break;
9012  default: goto __pyx_L5_argtuple_error;
9013  }
9014  kw_args = PyDict_Size(__pyx_kwds);
9015  switch (pos_args) {
9016  case 0:
9017  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
9018  else goto __pyx_L5_argtuple_error;
9019  CYTHON_FALLTHROUGH;
9020  case 1:
9021  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
9022  else {
9023  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 346, __pyx_L3_error)
9024  }
9025  CYTHON_FALLTHROUGH;
9026  case 2:
9027  if (kw_args > 0) {
9028  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
9029  if (value) { values[2] = value; kw_args--; }
9030  }
9031  }
9032  if (unlikely(kw_args > 0)) {
9033  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 346, __pyx_L3_error)
9034  }
9035  } else {
9036  switch (PyTuple_GET_SIZE(__pyx_args)) {
9037  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9038  CYTHON_FALLTHROUGH;
9039  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9040  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9041  break;
9042  default: goto __pyx_L5_argtuple_error;
9043  }
9044  }
9045  __pyx_v_obj = values[0];
9046  __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 346, __pyx_L3_error)
9047  if (values[2]) {
9048  __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 346, __pyx_L3_error)
9049  } else {
9050  __pyx_v_dtype_is_object = ((int)0);
9051  }
9052  }
9053  goto __pyx_L4_argument_unpacking_done;
9054  __pyx_L5_argtuple_error:;
9055  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 346, __pyx_L3_error)
9056  __pyx_L3_error:;
9057  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9058  __Pyx_RefNannyFinishContext();
9059  return -1;
9060  __pyx_L4_argument_unpacking_done:;
9061  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
9062 
9063  /* function exit code */
9064  __Pyx_RefNannyFinishContext();
9065  return __pyx_r;
9066 }
9067 
9068 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
9069  int __pyx_r;
9070  __Pyx_TraceDeclarations
9071  __Pyx_RefNannyDeclarations
9072  int __pyx_t_1;
9073  int __pyx_t_2;
9074  int __pyx_t_3;
9075  int __pyx_t_4;
9076  int __pyx_lineno = 0;
9077  const char *__pyx_filename = NULL;
9078  int __pyx_clineno = 0;
9079  __Pyx_RefNannySetupContext("__cinit__", 0);
9080  __Pyx_TraceCall("__cinit__", __pyx_f[1], 346, 0, __PYX_ERR(1, 346, __pyx_L1_error));
9081 
9082  /* "View.MemoryView":347
9083  *
9084  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
9085  * self.obj = obj # <<<<<<<<<<<<<<
9086  * self.flags = flags
9087  * if type(self) is memoryview or obj is not None:
9088  */
9089  __Pyx_TraceLine(347,0,__PYX_ERR(1, 347, __pyx_L1_error))
9090  __Pyx_INCREF(__pyx_v_obj);
9091  __Pyx_GIVEREF(__pyx_v_obj);
9092  __Pyx_GOTREF(__pyx_v_self->obj);
9093  __Pyx_DECREF(__pyx_v_self->obj);
9094  __pyx_v_self->obj = __pyx_v_obj;
9095 
9096  /* "View.MemoryView":348
9097  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
9098  * self.obj = obj
9099  * self.flags = flags # <<<<<<<<<<<<<<
9100  * if type(self) is memoryview or obj is not None:
9101  * __Pyx_GetBuffer(obj, &self.view, flags)
9102  */
9103  __Pyx_TraceLine(348,0,__PYX_ERR(1, 348, __pyx_L1_error))
9104  __pyx_v_self->flags = __pyx_v_flags;
9105 
9106  /* "View.MemoryView":349
9107  * self.obj = obj
9108  * self.flags = flags
9109  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
9110  * __Pyx_GetBuffer(obj, &self.view, flags)
9111  * if <PyObject *> self.view.obj == NULL:
9112  */
9113  __Pyx_TraceLine(349,0,__PYX_ERR(1, 349, __pyx_L1_error))
9114  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
9115  __pyx_t_3 = (__pyx_t_2 != 0);
9116  if (!__pyx_t_3) {
9117  } else {
9118  __pyx_t_1 = __pyx_t_3;
9119  goto __pyx_L4_bool_binop_done;
9120  }
9121  __pyx_t_3 = (__pyx_v_obj != Py_None);
9122  __pyx_t_2 = (__pyx_t_3 != 0);
9123  __pyx_t_1 = __pyx_t_2;
9124  __pyx_L4_bool_binop_done:;
9125  if (__pyx_t_1) {
9126 
9127  /* "View.MemoryView":350
9128  * self.flags = flags
9129  * if type(self) is memoryview or obj is not None:
9130  * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
9131  * if <PyObject *> self.view.obj == NULL:
9132  * (<__pyx_buffer *> &self.view).obj = Py_None
9133  */
9134  __Pyx_TraceLine(350,0,__PYX_ERR(1, 350, __pyx_L1_error))
9135  __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 350, __pyx_L1_error)
9136 
9137  /* "View.MemoryView":351
9138  * if type(self) is memoryview or obj is not None:
9139  * __Pyx_GetBuffer(obj, &self.view, flags)
9140  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
9141  * (<__pyx_buffer *> &self.view).obj = Py_None
9142  * Py_INCREF(Py_None)
9143  */
9144  __Pyx_TraceLine(351,0,__PYX_ERR(1, 351, __pyx_L1_error))
9145  __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
9146  if (__pyx_t_1) {
9147 
9148  /* "View.MemoryView":352
9149  * __Pyx_GetBuffer(obj, &self.view, flags)
9150  * if <PyObject *> self.view.obj == NULL:
9151  * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
9152  * Py_INCREF(Py_None)
9153  *
9154  */
9155  __Pyx_TraceLine(352,0,__PYX_ERR(1, 352, __pyx_L1_error))
9156  ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
9157 
9158  /* "View.MemoryView":353
9159  * if <PyObject *> self.view.obj == NULL:
9160  * (<__pyx_buffer *> &self.view).obj = Py_None
9161  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
9162  *
9163  * if not __PYX_CYTHON_ATOMICS_ENABLED():
9164  */
9165  __Pyx_TraceLine(353,0,__PYX_ERR(1, 353, __pyx_L1_error))
9166  Py_INCREF(Py_None);
9167 
9168  /* "View.MemoryView":351
9169  * if type(self) is memoryview or obj is not None:
9170  * __Pyx_GetBuffer(obj, &self.view, flags)
9171  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
9172  * (<__pyx_buffer *> &self.view).obj = Py_None
9173  * Py_INCREF(Py_None)
9174  */
9175  }
9176 
9177  /* "View.MemoryView":349
9178  * self.obj = obj
9179  * self.flags = flags
9180  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
9181  * __Pyx_GetBuffer(obj, &self.view, flags)
9182  * if <PyObject *> self.view.obj == NULL:
9183  */
9184  }
9185 
9186  /* "View.MemoryView":355
9187  * Py_INCREF(Py_None)
9188  *
9189  * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<<
9190  * global __pyx_memoryview_thread_locks_used
9191  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
9192  */
9193  __Pyx_TraceLine(355,0,__PYX_ERR(1, 355, __pyx_L1_error))
9194  __pyx_t_1 = ((!(__PYX_CYTHON_ATOMICS_ENABLED() != 0)) != 0);
9195  if (__pyx_t_1) {
9196 
9197  /* "View.MemoryView":357
9198  * if not __PYX_CYTHON_ATOMICS_ENABLED():
9199  * global __pyx_memoryview_thread_locks_used
9200  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
9201  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
9202  * __pyx_memoryview_thread_locks_used += 1
9203  */
9204  __Pyx_TraceLine(357,0,__PYX_ERR(1, 357, __pyx_L1_error))
9205  __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
9206  if (__pyx_t_1) {
9207 
9208  /* "View.MemoryView":358
9209  * global __pyx_memoryview_thread_locks_used
9210  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
9211  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
9212  * __pyx_memoryview_thread_locks_used += 1
9213  * if self.lock is NULL:
9214  */
9215  __Pyx_TraceLine(358,0,__PYX_ERR(1, 358, __pyx_L1_error))
9216  __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
9217 
9218  /* "View.MemoryView":359
9219  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
9220  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
9221  * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
9222  * if self.lock is NULL:
9223  * self.lock = PyThread_allocate_lock()
9224  */
9225  __Pyx_TraceLine(359,0,__PYX_ERR(1, 359, __pyx_L1_error))
9226  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
9227 
9228  /* "View.MemoryView":357
9229  * if not __PYX_CYTHON_ATOMICS_ENABLED():
9230  * global __pyx_memoryview_thread_locks_used
9231  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
9232  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
9233  * __pyx_memoryview_thread_locks_used += 1
9234  */
9235  }
9236 
9237  /* "View.MemoryView":360
9238  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
9239  * __pyx_memoryview_thread_locks_used += 1
9240  * if self.lock is NULL: # <<<<<<<<<<<<<<
9241  * self.lock = PyThread_allocate_lock()
9242  * if self.lock is NULL:
9243  */
9244  __Pyx_TraceLine(360,0,__PYX_ERR(1, 360, __pyx_L1_error))
9245  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
9246  if (__pyx_t_1) {
9247 
9248  /* "View.MemoryView":361
9249  * __pyx_memoryview_thread_locks_used += 1
9250  * if self.lock is NULL:
9251  * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
9252  * if self.lock is NULL:
9253  * raise MemoryError
9254  */
9255  __Pyx_TraceLine(361,0,__PYX_ERR(1, 361, __pyx_L1_error))
9256  __pyx_v_self->lock = PyThread_allocate_lock();
9257 
9258  /* "View.MemoryView":362
9259  * if self.lock is NULL:
9260  * self.lock = PyThread_allocate_lock()
9261  * if self.lock is NULL: # <<<<<<<<<<<<<<
9262  * raise MemoryError
9263  *
9264  */
9265  __Pyx_TraceLine(362,0,__PYX_ERR(1, 362, __pyx_L1_error))
9266  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
9267  if (unlikely(__pyx_t_1)) {
9268 
9269  /* "View.MemoryView":363
9270  * self.lock = PyThread_allocate_lock()
9271  * if self.lock is NULL:
9272  * raise MemoryError # <<<<<<<<<<<<<<
9273  *
9274  * if flags & PyBUF_FORMAT:
9275  */
9276  __Pyx_TraceLine(363,0,__PYX_ERR(1, 363, __pyx_L1_error))
9277  PyErr_NoMemory(); __PYX_ERR(1, 363, __pyx_L1_error)
9278 
9279  /* "View.MemoryView":362
9280  * if self.lock is NULL:
9281  * self.lock = PyThread_allocate_lock()
9282  * if self.lock is NULL: # <<<<<<<<<<<<<<
9283  * raise MemoryError
9284  *
9285  */
9286  }
9287 
9288  /* "View.MemoryView":360
9289  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
9290  * __pyx_memoryview_thread_locks_used += 1
9291  * if self.lock is NULL: # <<<<<<<<<<<<<<
9292  * self.lock = PyThread_allocate_lock()
9293  * if self.lock is NULL:
9294  */
9295  }
9296 
9297  /* "View.MemoryView":355
9298  * Py_INCREF(Py_None)
9299  *
9300  * if not __PYX_CYTHON_ATOMICS_ENABLED(): # <<<<<<<<<<<<<<
9301  * global __pyx_memoryview_thread_locks_used
9302  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
9303  */
9304  }
9305 
9306  /* "View.MemoryView":365
9307  * raise MemoryError
9308  *
9309  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
9310  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
9311  * else:
9312  */
9313  __Pyx_TraceLine(365,0,__PYX_ERR(1, 365, __pyx_L1_error))
9314  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
9315  if (__pyx_t_1) {
9316 
9317  /* "View.MemoryView":366
9318  *
9319  * if flags & PyBUF_FORMAT:
9320  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
9321  * else:
9322  * self.dtype_is_object = dtype_is_object
9323  */
9324  __Pyx_TraceLine(366,0,__PYX_ERR(1, 366, __pyx_L1_error))
9325  __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
9326  if (__pyx_t_2) {
9327  } else {
9328  __pyx_t_1 = __pyx_t_2;
9329  goto __pyx_L12_bool_binop_done;
9330  }
9331  __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
9332  __pyx_t_1 = __pyx_t_2;
9333  __pyx_L12_bool_binop_done:;
9334  __pyx_v_self->dtype_is_object = __pyx_t_1;
9335 
9336  /* "View.MemoryView":365
9337  * raise MemoryError
9338  *
9339  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
9340  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
9341  * else:
9342  */
9343  goto __pyx_L11;
9344  }
9345 
9346  /* "View.MemoryView":368
9347  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
9348  * else:
9349  * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
9350  *
9351  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
9352  */
9353  __Pyx_TraceLine(368,0,__PYX_ERR(1, 368, __pyx_L1_error))
9354  /*else*/ {
9355  __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
9356  }
9357  __pyx_L11:;
9358 
9359  /* "View.MemoryView":370
9360  * self.dtype_is_object = dtype_is_object
9361  *
9362  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<<
9363  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
9364  * self.typeinfo = NULL
9365  */
9366  __Pyx_TraceLine(370,0,__PYX_ERR(1, 370, __pyx_L1_error))
9367  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
9368 
9369  /* "View.MemoryView":372
9370  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
9371  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
9372  * self.typeinfo = NULL # <<<<<<<<<<<<<<
9373  *
9374  * def __dealloc__(memoryview self):
9375  */
9376  __Pyx_TraceLine(372,0,__PYX_ERR(1, 372, __pyx_L1_error))
9377  __pyx_v_self->typeinfo = NULL;
9378 
9379  /* "View.MemoryView":346
9380  * cdef __Pyx_TypeInfo *typeinfo
9381  *
9382  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
9383  * self.obj = obj
9384  * self.flags = flags
9385  */
9386 
9387  /* function exit code */
9388  __pyx_r = 0;
9389  goto __pyx_L0;
9390  __pyx_L1_error:;
9391  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9392  __pyx_r = -1;
9393  __pyx_L0:;
9394  __Pyx_TraceReturn(Py_None, 0);
9395  __Pyx_RefNannyFinishContext();
9396  return __pyx_r;
9397 }
9398 
9399 /* "View.MemoryView":374
9400  * self.typeinfo = NULL
9401  *
9402  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
9403  * if self.obj is not None:
9404  * __Pyx_ReleaseBuffer(&self.view)
9405  */
9406 
9407 /* Python wrapper */
9408 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
9409 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
9410  __Pyx_RefNannyDeclarations
9411  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
9412  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
9413 
9414  /* function exit code */
9415  __Pyx_RefNannyFinishContext();
9416 }
9417 
9418 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
9419  int __pyx_v_i;
9420  __Pyx_TraceDeclarations
9421  __Pyx_RefNannyDeclarations
9422  int __pyx_t_1;
9423  int __pyx_t_2;
9424  int __pyx_t_3;
9425  int __pyx_t_4;
9426  int __pyx_t_5;
9427  PyThread_type_lock __pyx_t_6;
9428  PyThread_type_lock __pyx_t_7;
9429  int __pyx_lineno = 0;
9430  const char *__pyx_filename = NULL;
9431  int __pyx_clineno = 0;
9432  __Pyx_RefNannySetupContext("__dealloc__", 0);
9433  __Pyx_TraceCall("__dealloc__", __pyx_f[1], 374, 0, __PYX_ERR(1, 374, __pyx_L1_error));
9434 
9435  /* "View.MemoryView":375
9436  *
9437  * def __dealloc__(memoryview self):
9438  * if self.obj is not None: # <<<<<<<<<<<<<<
9439  * __Pyx_ReleaseBuffer(&self.view)
9440  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
9441  */
9442  __Pyx_TraceLine(375,0,__PYX_ERR(1, 375, __pyx_L1_error))
9443  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
9444  __pyx_t_2 = (__pyx_t_1 != 0);
9445  if (__pyx_t_2) {
9446 
9447  /* "View.MemoryView":376
9448  * def __dealloc__(memoryview self):
9449  * if self.obj is not None:
9450  * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
9451  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
9452  *
9453  */
9454  __Pyx_TraceLine(376,0,__PYX_ERR(1, 376, __pyx_L1_error))
9455  __Pyx_ReleaseBuffer((&__pyx_v_self->view));
9456 
9457  /* "View.MemoryView":375
9458  *
9459  * def __dealloc__(memoryview self):
9460  * if self.obj is not None: # <<<<<<<<<<<<<<
9461  * __Pyx_ReleaseBuffer(&self.view)
9462  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
9463  */
9464  goto __pyx_L3;
9465  }
9466 
9467  /* "View.MemoryView":377
9468  * if self.obj is not None:
9469  * __Pyx_ReleaseBuffer(&self.view)
9470  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
9471  *
9472  * (<__pyx_buffer *> &self.view).obj = NULL
9473  */
9474  __Pyx_TraceLine(377,0,__PYX_ERR(1, 377, __pyx_L1_error))
9475  __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
9476  if (__pyx_t_2) {
9477 
9478  /* "View.MemoryView":379
9479  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
9480  *
9481  * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<<
9482  * Py_DECREF(Py_None)
9483  *
9484  */
9485  __Pyx_TraceLine(379,0,__PYX_ERR(1, 379, __pyx_L1_error))
9486  ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
9487 
9488  /* "View.MemoryView":380
9489  *
9490  * (<__pyx_buffer *> &self.view).obj = NULL
9491  * Py_DECREF(Py_None) # <<<<<<<<<<<<<<
9492  *
9493  * cdef int i
9494  */
9495  __Pyx_TraceLine(380,0,__PYX_ERR(1, 380, __pyx_L1_error))
9496  Py_DECREF(Py_None);
9497 
9498  /* "View.MemoryView":377
9499  * if self.obj is not None:
9500  * __Pyx_ReleaseBuffer(&self.view)
9501  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
9502  *
9503  * (<__pyx_buffer *> &self.view).obj = NULL
9504  */
9505  }
9506  __pyx_L3:;
9507 
9508  /* "View.MemoryView":384
9509  * cdef int i
9510  * global __pyx_memoryview_thread_locks_used
9511  * if self.lock != NULL: # <<<<<<<<<<<<<<
9512  * for i in range(__pyx_memoryview_thread_locks_used):
9513  * if __pyx_memoryview_thread_locks[i] is self.lock:
9514  */
9515  __Pyx_TraceLine(384,0,__PYX_ERR(1, 384, __pyx_L1_error))
9516  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
9517  if (__pyx_t_2) {
9518 
9519  /* "View.MemoryView":385
9520  * global __pyx_memoryview_thread_locks_used
9521  * if self.lock != NULL:
9522  * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
9523  * if __pyx_memoryview_thread_locks[i] is self.lock:
9524  * __pyx_memoryview_thread_locks_used -= 1
9525  */
9526  __Pyx_TraceLine(385,0,__PYX_ERR(1, 385, __pyx_L1_error))
9527  __pyx_t_3 = __pyx_memoryview_thread_locks_used;
9528  __pyx_t_4 = __pyx_t_3;
9529  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
9530  __pyx_v_i = __pyx_t_5;
9531 
9532  /* "View.MemoryView":386
9533  * if self.lock != NULL:
9534  * for i in range(__pyx_memoryview_thread_locks_used):
9535  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
9536  * __pyx_memoryview_thread_locks_used -= 1
9537  * if i != __pyx_memoryview_thread_locks_used:
9538  */
9539  __Pyx_TraceLine(386,0,__PYX_ERR(1, 386, __pyx_L1_error))
9540  __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
9541  if (__pyx_t_2) {
9542 
9543  /* "View.MemoryView":387
9544  * for i in range(__pyx_memoryview_thread_locks_used):
9545  * if __pyx_memoryview_thread_locks[i] is self.lock:
9546  * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
9547  * if i != __pyx_memoryview_thread_locks_used:
9548  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
9549  */
9550  __Pyx_TraceLine(387,0,__PYX_ERR(1, 387, __pyx_L1_error))
9551  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
9552 
9553  /* "View.MemoryView":388
9554  * if __pyx_memoryview_thread_locks[i] is self.lock:
9555  * __pyx_memoryview_thread_locks_used -= 1
9556  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
9557  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
9558  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
9559  */
9560  __Pyx_TraceLine(388,0,__PYX_ERR(1, 388, __pyx_L1_error))
9561  __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
9562  if (__pyx_t_2) {
9563 
9564  /* "View.MemoryView":390
9565  * if i != __pyx_memoryview_thread_locks_used:
9566  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
9567  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
9568  * break
9569  * else:
9570  */
9571  __Pyx_TraceLine(390,0,__PYX_ERR(1, 390, __pyx_L1_error))
9572  __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
9573  __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
9574 
9575  /* "View.MemoryView":389
9576  * __pyx_memoryview_thread_locks_used -= 1
9577  * if i != __pyx_memoryview_thread_locks_used:
9578  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
9579  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
9580  * break
9581  */
9582  __Pyx_TraceLine(389,0,__PYX_ERR(1, 389, __pyx_L1_error))
9583  (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
9584  (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
9585 
9586  /* "View.MemoryView":388
9587  * if __pyx_memoryview_thread_locks[i] is self.lock:
9588  * __pyx_memoryview_thread_locks_used -= 1
9589  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
9590  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
9591  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
9592  */
9593  }
9594 
9595  /* "View.MemoryView":391
9596  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
9597  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
9598  * break # <<<<<<<<<<<<<<
9599  * else:
9600  * PyThread_free_lock(self.lock)
9601  */
9602  __Pyx_TraceLine(391,0,__PYX_ERR(1, 391, __pyx_L1_error))
9603  goto __pyx_L6_break;
9604 
9605  /* "View.MemoryView":386
9606  * if self.lock != NULL:
9607  * for i in range(__pyx_memoryview_thread_locks_used):
9608  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
9609  * __pyx_memoryview_thread_locks_used -= 1
9610  * if i != __pyx_memoryview_thread_locks_used:
9611  */
9612  }
9613  }
9614  /*else*/ {
9615 
9616  /* "View.MemoryView":393
9617  * break
9618  * else:
9619  * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
9620  *
9621  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
9622  */
9623  __Pyx_TraceLine(393,0,__PYX_ERR(1, 393, __pyx_L1_error))
9624  PyThread_free_lock(__pyx_v_self->lock);
9625  }
9626  __pyx_L6_break:;
9627 
9628  /* "View.MemoryView":384
9629  * cdef int i
9630  * global __pyx_memoryview_thread_locks_used
9631  * if self.lock != NULL: # <<<<<<<<<<<<<<
9632  * for i in range(__pyx_memoryview_thread_locks_used):
9633  * if __pyx_memoryview_thread_locks[i] is self.lock:
9634  */
9635  }
9636 
9637  /* "View.MemoryView":374
9638  * self.typeinfo = NULL
9639  *
9640  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
9641  * if self.obj is not None:
9642  * __Pyx_ReleaseBuffer(&self.view)
9643  */
9644 
9645  /* function exit code */
9646  goto __pyx_L0;
9647  __pyx_L1_error:;
9648  __Pyx_WriteUnraisable("View.MemoryView.memoryview.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
9649  __pyx_L0:;
9650  __Pyx_TraceReturn(Py_None, 0);
9651  __Pyx_RefNannyFinishContext();
9652 }
9653 
9654 /* "View.MemoryView":395
9655  * PyThread_free_lock(self.lock)
9656  *
9657  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
9658  * cdef Py_ssize_t dim
9659  * cdef char *itemp = <char *> self.view.buf
9660  */
9661 
9662 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
9663  Py_ssize_t __pyx_v_dim;
9664  char *__pyx_v_itemp;
9665  PyObject *__pyx_v_idx = NULL;
9666  char *__pyx_r;
9667  __Pyx_TraceDeclarations
9668  __Pyx_RefNannyDeclarations
9669  Py_ssize_t __pyx_t_1;
9670  PyObject *__pyx_t_2 = NULL;
9671  Py_ssize_t __pyx_t_3;
9672  PyObject *(*__pyx_t_4)(PyObject *);
9673  PyObject *__pyx_t_5 = NULL;
9674  Py_ssize_t __pyx_t_6;
9675  char *__pyx_t_7;
9676  int __pyx_lineno = 0;
9677  const char *__pyx_filename = NULL;
9678  int __pyx_clineno = 0;
9679  __Pyx_RefNannySetupContext("get_item_pointer", 0);
9680  __Pyx_TraceCall("get_item_pointer", __pyx_f[1], 395, 0, __PYX_ERR(1, 395, __pyx_L1_error));
9681 
9682  /* "View.MemoryView":397
9683  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
9684  * cdef Py_ssize_t dim
9685  * cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
9686  *
9687  * for dim, idx in enumerate(index):
9688  */
9689  __Pyx_TraceLine(397,0,__PYX_ERR(1, 397, __pyx_L1_error))
9690  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
9691 
9692  /* "View.MemoryView":399
9693  * cdef char *itemp = <char *> self.view.buf
9694  *
9695  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
9696  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
9697  *
9698  */
9699  __Pyx_TraceLine(399,0,__PYX_ERR(1, 399, __pyx_L1_error))
9700  __pyx_t_1 = 0;
9701  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
9702  __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
9703  __pyx_t_4 = NULL;
9704  } else {
9705  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 399, __pyx_L1_error)
9706  __Pyx_GOTREF(__pyx_t_2);
9707  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 399, __pyx_L1_error)
9708  }
9709  for (;;) {
9710  if (likely(!__pyx_t_4)) {
9711  if (likely(PyList_CheckExact(__pyx_t_2))) {
9712  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
9713  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9714  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 399, __pyx_L1_error)
9715  #else
9716  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 399, __pyx_L1_error)
9717  __Pyx_GOTREF(__pyx_t_5);
9718  #endif
9719  } else {
9720  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
9721  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9722  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 399, __pyx_L1_error)
9723  #else
9724  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 399, __pyx_L1_error)
9725  __Pyx_GOTREF(__pyx_t_5);
9726  #endif
9727  }
9728  } else {
9729  __pyx_t_5 = __pyx_t_4(__pyx_t_2);
9730  if (unlikely(!__pyx_t_5)) {
9731  PyObject* exc_type = PyErr_Occurred();
9732  if (exc_type) {
9733  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
9734  else __PYX_ERR(1, 399, __pyx_L1_error)
9735  }
9736  break;
9737  }
9738  __Pyx_GOTREF(__pyx_t_5);
9739  }
9740  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
9741  __pyx_t_5 = 0;
9742  __pyx_v_dim = __pyx_t_1;
9743  __pyx_t_1 = (__pyx_t_1 + 1);
9744 
9745  /* "View.MemoryView":400
9746  *
9747  * for dim, idx in enumerate(index):
9748  * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
9749  *
9750  * return itemp
9751  */
9752  __Pyx_TraceLine(400,0,__PYX_ERR(1, 400, __pyx_L1_error))
9753  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 400, __pyx_L1_error)
9754  __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 400, __pyx_L1_error)
9755  __pyx_v_itemp = __pyx_t_7;
9756 
9757  /* "View.MemoryView":399
9758  * cdef char *itemp = <char *> self.view.buf
9759  *
9760  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
9761  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
9762  *
9763  */
9764  __Pyx_TraceLine(399,0,__PYX_ERR(1, 399, __pyx_L1_error))
9765  }
9766  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9767 
9768  /* "View.MemoryView":402
9769  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
9770  *
9771  * return itemp # <<<<<<<<<<<<<<
9772  *
9773  *
9774  */
9775  __Pyx_TraceLine(402,0,__PYX_ERR(1, 402, __pyx_L1_error))
9776  __pyx_r = __pyx_v_itemp;
9777  goto __pyx_L0;
9778 
9779  /* "View.MemoryView":395
9780  * PyThread_free_lock(self.lock)
9781  *
9782  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
9783  * cdef Py_ssize_t dim
9784  * cdef char *itemp = <char *> self.view.buf
9785  */
9786 
9787  /* function exit code */
9788  __pyx_L1_error:;
9789  __Pyx_XDECREF(__pyx_t_2);
9790  __Pyx_XDECREF(__pyx_t_5);
9791  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
9792  __pyx_r = NULL;
9793  __pyx_L0:;
9794  __Pyx_XDECREF(__pyx_v_idx);
9795  __Pyx_TraceReturn(Py_None, 0);
9796  __Pyx_RefNannyFinishContext();
9797  return __pyx_r;
9798 }
9799 
9800 /* "View.MemoryView":405
9801  *
9802  *
9803  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
9804  * if index is Ellipsis:
9805  * return self
9806  */
9807 
9808 /* Python wrapper */
9809 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
9810 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
9811  PyObject *__pyx_r = 0;
9812  __Pyx_RefNannyDeclarations
9813  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
9814  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
9815 
9816  /* function exit code */
9817  __Pyx_RefNannyFinishContext();
9818  return __pyx_r;
9819 }
9820 
9821 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
9822  PyObject *__pyx_v_have_slices = NULL;
9823  PyObject *__pyx_v_indices = NULL;
9824  char *__pyx_v_itemp;
9825  PyObject *__pyx_r = NULL;
9826  __Pyx_TraceDeclarations
9827  __Pyx_RefNannyDeclarations
9828  int __pyx_t_1;
9829  int __pyx_t_2;
9830  PyObject *__pyx_t_3 = NULL;
9831  PyObject *__pyx_t_4 = NULL;
9832  PyObject *__pyx_t_5 = NULL;
9833  char *__pyx_t_6;
9834  int __pyx_lineno = 0;
9835  const char *__pyx_filename = NULL;
9836  int __pyx_clineno = 0;
9837  __Pyx_RefNannySetupContext("__getitem__", 0);
9838  __Pyx_TraceCall("__getitem__", __pyx_f[1], 405, 0, __PYX_ERR(1, 405, __pyx_L1_error));
9839 
9840  /* "View.MemoryView":406
9841  *
9842  * def __getitem__(memoryview self, object index):
9843  * if index is Ellipsis: # <<<<<<<<<<<<<<
9844  * return self
9845  *
9846  */
9847  __Pyx_TraceLine(406,0,__PYX_ERR(1, 406, __pyx_L1_error))
9848  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
9849  __pyx_t_2 = (__pyx_t_1 != 0);
9850  if (__pyx_t_2) {
9851 
9852  /* "View.MemoryView":407
9853  * def __getitem__(memoryview self, object index):
9854  * if index is Ellipsis:
9855  * return self # <<<<<<<<<<<<<<
9856  *
9857  * have_slices, indices = _unellipsify(index, self.view.ndim)
9858  */
9859  __Pyx_TraceLine(407,0,__PYX_ERR(1, 407, __pyx_L1_error))
9860  __Pyx_XDECREF(__pyx_r);
9861  __Pyx_INCREF(((PyObject *)__pyx_v_self));
9862  __pyx_r = ((PyObject *)__pyx_v_self);
9863  goto __pyx_L0;
9864 
9865  /* "View.MemoryView":406
9866  *
9867  * def __getitem__(memoryview self, object index):
9868  * if index is Ellipsis: # <<<<<<<<<<<<<<
9869  * return self
9870  *
9871  */
9872  }
9873 
9874  /* "View.MemoryView":409
9875  * return self
9876  *
9877  * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
9878  *
9879  * cdef char *itemp
9880  */
9881  __Pyx_TraceLine(409,0,__PYX_ERR(1, 409, __pyx_L1_error))
9882  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 409, __pyx_L1_error)
9883  __Pyx_GOTREF(__pyx_t_3);
9884  if (likely(__pyx_t_3 != Py_None)) {
9885  PyObject* sequence = __pyx_t_3;
9886  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
9887  if (unlikely(size != 2)) {
9888  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
9889  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
9890  __PYX_ERR(1, 409, __pyx_L1_error)
9891  }
9892  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
9893  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
9894  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
9895  __Pyx_INCREF(__pyx_t_4);
9896  __Pyx_INCREF(__pyx_t_5);
9897  #else
9898  __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 409, __pyx_L1_error)
9899  __Pyx_GOTREF(__pyx_t_4);
9900  __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 409, __pyx_L1_error)
9901  __Pyx_GOTREF(__pyx_t_5);
9902  #endif
9903  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9904  } else {
9905  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 409, __pyx_L1_error)
9906  }
9907  __pyx_v_have_slices = __pyx_t_4;
9908  __pyx_t_4 = 0;
9909  __pyx_v_indices = __pyx_t_5;
9910  __pyx_t_5 = 0;
9911 
9912  /* "View.MemoryView":412
9913  *
9914  * cdef char *itemp
9915  * if have_slices: # <<<<<<<<<<<<<<
9916  * return memview_slice(self, indices)
9917  * else:
9918  */
9919  __Pyx_TraceLine(412,0,__PYX_ERR(1, 412, __pyx_L1_error))
9920  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 412, __pyx_L1_error)
9921  if (__pyx_t_2) {
9922 
9923  /* "View.MemoryView":413
9924  * cdef char *itemp
9925  * if have_slices:
9926  * return memview_slice(self, indices) # <<<<<<<<<<<<<<
9927  * else:
9928  * itemp = self.get_item_pointer(indices)
9929  */
9930  __Pyx_TraceLine(413,0,__PYX_ERR(1, 413, __pyx_L1_error))
9931  __Pyx_XDECREF(__pyx_r);
9932  __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 413, __pyx_L1_error)
9933  __Pyx_GOTREF(__pyx_t_3);
9934  __pyx_r = __pyx_t_3;
9935  __pyx_t_3 = 0;
9936  goto __pyx_L0;
9937 
9938  /* "View.MemoryView":412
9939  *
9940  * cdef char *itemp
9941  * if have_slices: # <<<<<<<<<<<<<<
9942  * return memview_slice(self, indices)
9943  * else:
9944  */
9945  }
9946 
9947  /* "View.MemoryView":415
9948  * return memview_slice(self, indices)
9949  * else:
9950  * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
9951  * return self.convert_item_to_object(itemp)
9952  *
9953  */
9954  __Pyx_TraceLine(415,0,__PYX_ERR(1, 415, __pyx_L1_error))
9955  /*else*/ {
9956  __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(1, 415, __pyx_L1_error)
9957  __pyx_v_itemp = __pyx_t_6;
9958 
9959  /* "View.MemoryView":416
9960  * else:
9961  * itemp = self.get_item_pointer(indices)
9962  * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
9963  *
9964  * def __setitem__(memoryview self, object index, object value):
9965  */
9966  __Pyx_TraceLine(416,0,__PYX_ERR(1, 416, __pyx_L1_error))
9967  __Pyx_XDECREF(__pyx_r);
9968  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 416, __pyx_L1_error)
9969  __Pyx_GOTREF(__pyx_t_3);
9970  __pyx_r = __pyx_t_3;
9971  __pyx_t_3 = 0;
9972  goto __pyx_L0;
9973  }
9974 
9975  /* "View.MemoryView":405
9976  *
9977  *
9978  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
9979  * if index is Ellipsis:
9980  * return self
9981  */
9982 
9983  /* function exit code */
9984  __pyx_L1_error:;
9985  __Pyx_XDECREF(__pyx_t_3);
9986  __Pyx_XDECREF(__pyx_t_4);
9987  __Pyx_XDECREF(__pyx_t_5);
9988  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9989  __pyx_r = NULL;
9990  __pyx_L0:;
9991  __Pyx_XDECREF(__pyx_v_have_slices);
9992  __Pyx_XDECREF(__pyx_v_indices);
9993  __Pyx_XGIVEREF(__pyx_r);
9994  __Pyx_TraceReturn(__pyx_r, 0);
9995  __Pyx_RefNannyFinishContext();
9996  return __pyx_r;
9997 }
9998 
9999 /* "View.MemoryView":418
10000  * return self.convert_item_to_object(itemp)
10001  *
10002  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
10003  * if self.view.readonly:
10004  * raise TypeError("Cannot assign to read-only memoryview")
10005  */
10006 
10007 /* Python wrapper */
10008 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
10009 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
10010  int __pyx_r;
10011  __Pyx_RefNannyDeclarations
10012  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
10013  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
10014 
10015  /* function exit code */
10016  __Pyx_RefNannyFinishContext();
10017  return __pyx_r;
10018 }
10019 
10020 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
10021  PyObject *__pyx_v_have_slices = NULL;
10022  PyObject *__pyx_v_obj = NULL;
10023  int __pyx_r;
10024  __Pyx_TraceDeclarations
10025  __Pyx_RefNannyDeclarations
10026  int __pyx_t_1;
10027  PyObject *__pyx_t_2 = NULL;
10028  PyObject *__pyx_t_3 = NULL;
10029  PyObject *__pyx_t_4 = NULL;
10030  int __pyx_lineno = 0;
10031  const char *__pyx_filename = NULL;
10032  int __pyx_clineno = 0;
10033  __Pyx_RefNannySetupContext("__setitem__", 0);
10034  __Pyx_TraceCall("__setitem__", __pyx_f[1], 418, 0, __PYX_ERR(1, 418, __pyx_L1_error));
10035  __Pyx_INCREF(__pyx_v_index);
10036 
10037  /* "View.MemoryView":419
10038  *
10039  * def __setitem__(memoryview self, object index, object value):
10040  * if self.view.readonly: # <<<<<<<<<<<<<<
10041  * raise TypeError("Cannot assign to read-only memoryview")
10042  *
10043  */
10044  __Pyx_TraceLine(419,0,__PYX_ERR(1, 419, __pyx_L1_error))
10045  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
10046  if (unlikely(__pyx_t_1)) {
10047 
10048  /* "View.MemoryView":420
10049  * def __setitem__(memoryview self, object index, object value):
10050  * if self.view.readonly:
10051  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
10052  *
10053  * have_slices, index = _unellipsify(index, self.view.ndim)
10054  */
10055  __Pyx_TraceLine(420,0,__PYX_ERR(1, 420, __pyx_L1_error))
10056  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 420, __pyx_L1_error)
10057  __Pyx_GOTREF(__pyx_t_2);
10058  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
10059  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10060  __PYX_ERR(1, 420, __pyx_L1_error)
10061 
10062  /* "View.MemoryView":419
10063  *
10064  * def __setitem__(memoryview self, object index, object value):
10065  * if self.view.readonly: # <<<<<<<<<<<<<<
10066  * raise TypeError("Cannot assign to read-only memoryview")
10067  *
10068  */
10069  }
10070 
10071  /* "View.MemoryView":422
10072  * raise TypeError("Cannot assign to read-only memoryview")
10073  *
10074  * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
10075  *
10076  * if have_slices:
10077  */
10078  __Pyx_TraceLine(422,0,__PYX_ERR(1, 422, __pyx_L1_error))
10079  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 422, __pyx_L1_error)
10080  __Pyx_GOTREF(__pyx_t_2);
10081  if (likely(__pyx_t_2 != Py_None)) {
10082  PyObject* sequence = __pyx_t_2;
10083  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
10084  if (unlikely(size != 2)) {
10085  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
10086  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
10087  __PYX_ERR(1, 422, __pyx_L1_error)
10088  }
10089  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10090  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
10091  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
10092  __Pyx_INCREF(__pyx_t_3);
10093  __Pyx_INCREF(__pyx_t_4);
10094  #else
10095  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 422, __pyx_L1_error)
10096  __Pyx_GOTREF(__pyx_t_3);
10097  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 422, __pyx_L1_error)
10098  __Pyx_GOTREF(__pyx_t_4);
10099  #endif
10100  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10101  } else {
10102  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 422, __pyx_L1_error)
10103  }
10104  __pyx_v_have_slices = __pyx_t_3;
10105  __pyx_t_3 = 0;
10106  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
10107  __pyx_t_4 = 0;
10108 
10109  /* "View.MemoryView":424
10110  * have_slices, index = _unellipsify(index, self.view.ndim)
10111  *
10112  * if have_slices: # <<<<<<<<<<<<<<
10113  * obj = self.is_slice(value)
10114  * if obj:
10115  */
10116  __Pyx_TraceLine(424,0,__PYX_ERR(1, 424, __pyx_L1_error))
10117  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 424, __pyx_L1_error)
10118  if (__pyx_t_1) {
10119 
10120  /* "View.MemoryView":425
10121  *
10122  * if have_slices:
10123  * obj = self.is_slice(value) # <<<<<<<<<<<<<<
10124  * if obj:
10125  * self.setitem_slice_assignment(self[index], obj)
10126  */
10127  __Pyx_TraceLine(425,0,__PYX_ERR(1, 425, __pyx_L1_error))
10128  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error)
10129  __Pyx_GOTREF(__pyx_t_2);
10130  __pyx_v_obj = __pyx_t_2;
10131  __pyx_t_2 = 0;
10132 
10133  /* "View.MemoryView":426
10134  * if have_slices:
10135  * obj = self.is_slice(value)
10136  * if obj: # <<<<<<<<<<<<<<
10137  * self.setitem_slice_assignment(self[index], obj)
10138  * else:
10139  */
10140  __Pyx_TraceLine(426,0,__PYX_ERR(1, 426, __pyx_L1_error))
10141  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 426, __pyx_L1_error)
10142  if (__pyx_t_1) {
10143 
10144  /* "View.MemoryView":427
10145  * obj = self.is_slice(value)
10146  * if obj:
10147  * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
10148  * else:
10149  * self.setitem_slice_assign_scalar(self[index], value)
10150  */
10151  __Pyx_TraceLine(427,0,__PYX_ERR(1, 427, __pyx_L1_error))
10152  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 427, __pyx_L1_error)
10153  __Pyx_GOTREF(__pyx_t_2);
10154  __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 427, __pyx_L1_error)
10155  __Pyx_GOTREF(__pyx_t_4);
10156  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10157  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10158 
10159  /* "View.MemoryView":426
10160  * if have_slices:
10161  * obj = self.is_slice(value)
10162  * if obj: # <<<<<<<<<<<<<<
10163  * self.setitem_slice_assignment(self[index], obj)
10164  * else:
10165  */
10166  goto __pyx_L5;
10167  }
10168 
10169  /* "View.MemoryView":429
10170  * self.setitem_slice_assignment(self[index], obj)
10171  * else:
10172  * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
10173  * else:
10174  * self.setitem_indexed(index, value)
10175  */
10176  __Pyx_TraceLine(429,0,__PYX_ERR(1, 429, __pyx_L1_error))
10177  /*else*/ {
10178  __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 429, __pyx_L1_error)
10179  __Pyx_GOTREF(__pyx_t_4);
10180  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(1, 429, __pyx_L1_error)
10181  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 429, __pyx_L1_error)
10182  __Pyx_GOTREF(__pyx_t_2);
10183  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10184  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10185  }
10186  __pyx_L5:;
10187 
10188  /* "View.MemoryView":424
10189  * have_slices, index = _unellipsify(index, self.view.ndim)
10190  *
10191  * if have_slices: # <<<<<<<<<<<<<<
10192  * obj = self.is_slice(value)
10193  * if obj:
10194  */
10195  goto __pyx_L4;
10196  }
10197 
10198  /* "View.MemoryView":431
10199  * self.setitem_slice_assign_scalar(self[index], value)
10200  * else:
10201  * self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
10202  *
10203  * cdef is_slice(self, obj):
10204  */
10205  __Pyx_TraceLine(431,0,__PYX_ERR(1, 431, __pyx_L1_error))
10206  /*else*/ {
10207  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 431, __pyx_L1_error)
10208  __Pyx_GOTREF(__pyx_t_2);
10209  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10210  }
10211  __pyx_L4:;
10212 
10213  /* "View.MemoryView":418
10214  * return self.convert_item_to_object(itemp)
10215  *
10216  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
10217  * if self.view.readonly:
10218  * raise TypeError("Cannot assign to read-only memoryview")
10219  */
10220 
10221  /* function exit code */
10222  __pyx_r = 0;
10223  goto __pyx_L0;
10224  __pyx_L1_error:;
10225  __Pyx_XDECREF(__pyx_t_2);
10226  __Pyx_XDECREF(__pyx_t_3);
10227  __Pyx_XDECREF(__pyx_t_4);
10228  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10229  __pyx_r = -1;
10230  __pyx_L0:;
10231  __Pyx_XDECREF(__pyx_v_have_slices);
10232  __Pyx_XDECREF(__pyx_v_obj);
10233  __Pyx_XDECREF(__pyx_v_index);
10234  __Pyx_TraceReturn(Py_None, 0);
10235  __Pyx_RefNannyFinishContext();
10236  return __pyx_r;
10237 }
10238 
10239 /* "View.MemoryView":433
10240  * self.setitem_indexed(index, value)
10241  *
10242  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
10243  * if not isinstance(obj, memoryview):
10244  * try:
10245  */
10246 
10247 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
10248  PyObject *__pyx_r = NULL;
10249  __Pyx_TraceDeclarations
10250  __Pyx_RefNannyDeclarations
10251  int __pyx_t_1;
10252  int __pyx_t_2;
10253  PyObject *__pyx_t_3 = NULL;
10254  PyObject *__pyx_t_4 = NULL;
10255  PyObject *__pyx_t_5 = NULL;
10256  PyObject *__pyx_t_6 = NULL;
10257  PyObject *__pyx_t_7 = NULL;
10258  PyObject *__pyx_t_8 = NULL;
10259  int __pyx_t_9;
10260  int __pyx_lineno = 0;
10261  const char *__pyx_filename = NULL;
10262  int __pyx_clineno = 0;
10263  __Pyx_RefNannySetupContext("is_slice", 0);
10264  __Pyx_TraceCall("is_slice", __pyx_f[1], 433, 0, __PYX_ERR(1, 433, __pyx_L1_error));
10265  __Pyx_INCREF(__pyx_v_obj);
10266 
10267  /* "View.MemoryView":434
10268  *
10269  * cdef is_slice(self, obj):
10270  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
10271  * try:
10272  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10273  */
10274  __Pyx_TraceLine(434,0,__PYX_ERR(1, 434, __pyx_L1_error))
10275  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
10276  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
10277  if (__pyx_t_2) {
10278 
10279  /* "View.MemoryView":435
10280  * cdef is_slice(self, obj):
10281  * if not isinstance(obj, memoryview):
10282  * try: # <<<<<<<<<<<<<<
10283  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10284  * self.dtype_is_object)
10285  */
10286  __Pyx_TraceLine(435,0,__PYX_ERR(1, 435, __pyx_L1_error))
10287  {
10288  __Pyx_PyThreadState_declare
10289  __Pyx_PyThreadState_assign
10290  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
10291  __Pyx_XGOTREF(__pyx_t_3);
10292  __Pyx_XGOTREF(__pyx_t_4);
10293  __Pyx_XGOTREF(__pyx_t_5);
10294  /*try:*/ {
10295 
10296  /* "View.MemoryView":436
10297  * if not isinstance(obj, memoryview):
10298  * try:
10299  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
10300  * self.dtype_is_object)
10301  * except TypeError:
10302  */
10303  __Pyx_TraceLine(436,0,__PYX_ERR(1, 436, __pyx_L4_error))
10304  __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 436, __pyx_L4_error)
10305  __Pyx_GOTREF(__pyx_t_6);
10306 
10307  /* "View.MemoryView":437
10308  * try:
10309  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10310  * self.dtype_is_object) # <<<<<<<<<<<<<<
10311  * except TypeError:
10312  * return None
10313  */
10314  __Pyx_TraceLine(437,0,__PYX_ERR(1, 437, __pyx_L4_error))
10315  __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 437, __pyx_L4_error)
10316  __Pyx_GOTREF(__pyx_t_7);
10317 
10318  /* "View.MemoryView":436
10319  * if not isinstance(obj, memoryview):
10320  * try:
10321  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
10322  * self.dtype_is_object)
10323  * except TypeError:
10324  */
10325  __Pyx_TraceLine(436,0,__PYX_ERR(1, 436, __pyx_L4_error))
10326  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 436, __pyx_L4_error)
10327  __Pyx_GOTREF(__pyx_t_8);
10328  __Pyx_INCREF(__pyx_v_obj);
10329  __Pyx_GIVEREF(__pyx_v_obj);
10330  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
10331  __Pyx_GIVEREF(__pyx_t_6);
10332  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
10333  __Pyx_GIVEREF(__pyx_t_7);
10334  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
10335  __pyx_t_6 = 0;
10336  __pyx_t_7 = 0;
10337  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 436, __pyx_L4_error)
10338  __Pyx_GOTREF(__pyx_t_7);
10339  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10340  __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
10341  __pyx_t_7 = 0;
10342 
10343  /* "View.MemoryView":435
10344  * cdef is_slice(self, obj):
10345  * if not isinstance(obj, memoryview):
10346  * try: # <<<<<<<<<<<<<<
10347  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10348  * self.dtype_is_object)
10349  */
10350  }
10351  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10352  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10353  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10354  goto __pyx_L9_try_end;
10355  __pyx_L4_error:;
10356  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10357  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10358  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
10359 
10360  /* "View.MemoryView":438
10361  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10362  * self.dtype_is_object)
10363  * except TypeError: # <<<<<<<<<<<<<<
10364  * return None
10365  *
10366  */
10367  __Pyx_TraceLine(438,0,__PYX_ERR(1, 438, __pyx_L6_except_error))
10368  __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
10369  if (__pyx_t_9) {
10370  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
10371  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 438, __pyx_L6_except_error)
10372  __Pyx_GOTREF(__pyx_t_7);
10373  __Pyx_GOTREF(__pyx_t_8);
10374  __Pyx_GOTREF(__pyx_t_6);
10375 
10376  /* "View.MemoryView":439
10377  * self.dtype_is_object)
10378  * except TypeError:
10379  * return None # <<<<<<<<<<<<<<
10380  *
10381  * return obj
10382  */
10383  __Pyx_TraceLine(439,0,__PYX_ERR(1, 439, __pyx_L6_except_error))
10384  __Pyx_XDECREF(__pyx_r);
10385  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10386  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10387  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10388  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
10389  goto __pyx_L7_except_return;
10390  }
10391  goto __pyx_L6_except_error;
10392  __pyx_L6_except_error:;
10393 
10394  /* "View.MemoryView":435
10395  * cdef is_slice(self, obj):
10396  * if not isinstance(obj, memoryview):
10397  * try: # <<<<<<<<<<<<<<
10398  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10399  * self.dtype_is_object)
10400  */
10401  __Pyx_XGIVEREF(__pyx_t_3);
10402  __Pyx_XGIVEREF(__pyx_t_4);
10403  __Pyx_XGIVEREF(__pyx_t_5);
10404  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
10405  goto __pyx_L1_error;
10406  __pyx_L7_except_return:;
10407  __Pyx_XGIVEREF(__pyx_t_3);
10408  __Pyx_XGIVEREF(__pyx_t_4);
10409  __Pyx_XGIVEREF(__pyx_t_5);
10410  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
10411  goto __pyx_L0;
10412  __pyx_L9_try_end:;
10413  }
10414 
10415  /* "View.MemoryView":434
10416  *
10417  * cdef is_slice(self, obj):
10418  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
10419  * try:
10420  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
10421  */
10422  }
10423 
10424  /* "View.MemoryView":441
10425  * return None
10426  *
10427  * return obj # <<<<<<<<<<<<<<
10428  *
10429  * cdef setitem_slice_assignment(self, dst, src):
10430  */
10431  __Pyx_TraceLine(441,0,__PYX_ERR(1, 441, __pyx_L1_error))
10432  __Pyx_XDECREF(__pyx_r);
10433  __Pyx_INCREF(__pyx_v_obj);
10434  __pyx_r = __pyx_v_obj;
10435  goto __pyx_L0;
10436 
10437  /* "View.MemoryView":433
10438  * self.setitem_indexed(index, value)
10439  *
10440  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
10441  * if not isinstance(obj, memoryview):
10442  * try:
10443  */
10444 
10445  /* function exit code */
10446  __pyx_L1_error:;
10447  __Pyx_XDECREF(__pyx_t_6);
10448  __Pyx_XDECREF(__pyx_t_7);
10449  __Pyx_XDECREF(__pyx_t_8);
10450  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
10451  __pyx_r = 0;
10452  __pyx_L0:;
10453  __Pyx_XDECREF(__pyx_v_obj);
10454  __Pyx_XGIVEREF(__pyx_r);
10455  __Pyx_TraceReturn(__pyx_r, 0);
10456  __Pyx_RefNannyFinishContext();
10457  return __pyx_r;
10458 }
10459 
10460 /* "View.MemoryView":443
10461  * return obj
10462  *
10463  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
10464  * cdef __Pyx_memviewslice dst_slice
10465  * cdef __Pyx_memviewslice src_slice
10466  */
10467 
10468 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
10469  __Pyx_memviewslice __pyx_v_dst_slice;
10470  __Pyx_memviewslice __pyx_v_src_slice;
10471  PyObject *__pyx_r = NULL;
10472  __Pyx_TraceDeclarations
10473  __Pyx_RefNannyDeclarations
10474  __Pyx_memviewslice *__pyx_t_1;
10475  __Pyx_memviewslice *__pyx_t_2;
10476  PyObject *__pyx_t_3 = NULL;
10477  int __pyx_t_4;
10478  int __pyx_t_5;
10479  int __pyx_t_6;
10480  int __pyx_lineno = 0;
10481  const char *__pyx_filename = NULL;
10482  int __pyx_clineno = 0;
10483  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
10484  __Pyx_TraceCall("setitem_slice_assignment", __pyx_f[1], 443, 0, __PYX_ERR(1, 443, __pyx_L1_error));
10485 
10486  /* "View.MemoryView":447
10487  * cdef __Pyx_memviewslice src_slice
10488  *
10489  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
10490  * get_slice_from_memview(dst, &dst_slice)[0],
10491  * src.ndim, dst.ndim, self.dtype_is_object)
10492  */
10493  __Pyx_TraceLine(447,0,__PYX_ERR(1, 447, __pyx_L1_error))
10494  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 447, __pyx_L1_error)
10495  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 447, __pyx_L1_error)
10496 
10497  /* "View.MemoryView":448
10498  *
10499  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
10500  * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<<
10501  * src.ndim, dst.ndim, self.dtype_is_object)
10502  *
10503  */
10504  __Pyx_TraceLine(448,0,__PYX_ERR(1, 448, __pyx_L1_error))
10505  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error)
10506  __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error)
10507 
10508  /* "View.MemoryView":449
10509  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
10510  * get_slice_from_memview(dst, &dst_slice)[0],
10511  * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
10512  *
10513  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
10514  */
10515  __Pyx_TraceLine(449,0,__PYX_ERR(1, 449, __pyx_L1_error))
10516  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 449, __pyx_L1_error)
10517  __Pyx_GOTREF(__pyx_t_3);
10518  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 449, __pyx_L1_error)
10519  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10520  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 449, __pyx_L1_error)
10521  __Pyx_GOTREF(__pyx_t_3);
10522  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 449, __pyx_L1_error)
10523  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10524 
10525  /* "View.MemoryView":447
10526  * cdef __Pyx_memviewslice src_slice
10527  *
10528  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
10529  * get_slice_from_memview(dst, &dst_slice)[0],
10530  * src.ndim, dst.ndim, self.dtype_is_object)
10531  */
10532  __Pyx_TraceLine(447,0,__PYX_ERR(1, 447, __pyx_L1_error))
10533  __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 447, __pyx_L1_error)
10534 
10535  /* "View.MemoryView":443
10536  * return obj
10537  *
10538  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
10539  * cdef __Pyx_memviewslice dst_slice
10540  * cdef __Pyx_memviewslice src_slice
10541  */
10542 
10543  /* function exit code */
10544  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10545  goto __pyx_L0;
10546  __pyx_L1_error:;
10547  __Pyx_XDECREF(__pyx_t_3);
10548  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
10549  __pyx_r = 0;
10550  __pyx_L0:;
10551  __Pyx_XGIVEREF(__pyx_r);
10552  __Pyx_TraceReturn(__pyx_r, 0);
10553  __Pyx_RefNannyFinishContext();
10554  return __pyx_r;
10555 }
10556 
10557 /* "View.MemoryView":451
10558  * src.ndim, dst.ndim, self.dtype_is_object)
10559  *
10560  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
10561  * cdef int array[128]
10562  * cdef void *tmp = NULL
10563  */
10564 
10565 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
10566  int __pyx_v_array[0x80];
10567  void *__pyx_v_tmp;
10568  void *__pyx_v_item;
10569  __Pyx_memviewslice *__pyx_v_dst_slice;
10570  __Pyx_memviewslice __pyx_v_tmp_slice;
10571  PyObject *__pyx_r = NULL;
10572  __Pyx_TraceDeclarations
10573  __Pyx_RefNannyDeclarations
10574  __Pyx_memviewslice *__pyx_t_1;
10575  int __pyx_t_2;
10576  PyObject *__pyx_t_3 = NULL;
10577  int __pyx_t_4;
10578  int __pyx_t_5;
10579  char const *__pyx_t_6;
10580  PyObject *__pyx_t_7 = NULL;
10581  PyObject *__pyx_t_8 = NULL;
10582  PyObject *__pyx_t_9 = NULL;
10583  PyObject *__pyx_t_10 = NULL;
10584  PyObject *__pyx_t_11 = NULL;
10585  PyObject *__pyx_t_12 = NULL;
10586  int __pyx_lineno = 0;
10587  const char *__pyx_filename = NULL;
10588  int __pyx_clineno = 0;
10589  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
10590  __Pyx_TraceCall("setitem_slice_assign_scalar", __pyx_f[1], 451, 0, __PYX_ERR(1, 451, __pyx_L1_error));
10591 
10592  /* "View.MemoryView":453
10593  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
10594  * cdef int array[128]
10595  * cdef void *tmp = NULL # <<<<<<<<<<<<<<
10596  * cdef void *item
10597  *
10598  */
10599  __Pyx_TraceLine(453,0,__PYX_ERR(1, 453, __pyx_L1_error))
10600  __pyx_v_tmp = NULL;
10601 
10602  /* "View.MemoryView":458
10603  * cdef __Pyx_memviewslice *dst_slice
10604  * cdef __Pyx_memviewslice tmp_slice
10605  * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
10606  *
10607  * if <size_t>self.view.itemsize > sizeof(array):
10608  */
10609  __Pyx_TraceLine(458,0,__PYX_ERR(1, 458, __pyx_L1_error))
10610  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 458, __pyx_L1_error)
10611  __pyx_v_dst_slice = __pyx_t_1;
10612 
10613  /* "View.MemoryView":460
10614  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
10615  *
10616  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
10617  * tmp = PyMem_Malloc(self.view.itemsize)
10618  * if tmp == NULL:
10619  */
10620  __Pyx_TraceLine(460,0,__PYX_ERR(1, 460, __pyx_L1_error))
10621  __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
10622  if (__pyx_t_2) {
10623 
10624  /* "View.MemoryView":461
10625  *
10626  * if <size_t>self.view.itemsize > sizeof(array):
10627  * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
10628  * if tmp == NULL:
10629  * raise MemoryError
10630  */
10631  __Pyx_TraceLine(461,0,__PYX_ERR(1, 461, __pyx_L1_error))
10632  __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
10633 
10634  /* "View.MemoryView":462
10635  * if <size_t>self.view.itemsize > sizeof(array):
10636  * tmp = PyMem_Malloc(self.view.itemsize)
10637  * if tmp == NULL: # <<<<<<<<<<<<<<
10638  * raise MemoryError
10639  * item = tmp
10640  */
10641  __Pyx_TraceLine(462,0,__PYX_ERR(1, 462, __pyx_L1_error))
10642  __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
10643  if (unlikely(__pyx_t_2)) {
10644 
10645  /* "View.MemoryView":463
10646  * tmp = PyMem_Malloc(self.view.itemsize)
10647  * if tmp == NULL:
10648  * raise MemoryError # <<<<<<<<<<<<<<
10649  * item = tmp
10650  * else:
10651  */
10652  __Pyx_TraceLine(463,0,__PYX_ERR(1, 463, __pyx_L1_error))
10653  PyErr_NoMemory(); __PYX_ERR(1, 463, __pyx_L1_error)
10654 
10655  /* "View.MemoryView":462
10656  * if <size_t>self.view.itemsize > sizeof(array):
10657  * tmp = PyMem_Malloc(self.view.itemsize)
10658  * if tmp == NULL: # <<<<<<<<<<<<<<
10659  * raise MemoryError
10660  * item = tmp
10661  */
10662  }
10663 
10664  /* "View.MemoryView":464
10665  * if tmp == NULL:
10666  * raise MemoryError
10667  * item = tmp # <<<<<<<<<<<<<<
10668  * else:
10669  * item = <void *> array
10670  */
10671  __Pyx_TraceLine(464,0,__PYX_ERR(1, 464, __pyx_L1_error))
10672  __pyx_v_item = __pyx_v_tmp;
10673 
10674  /* "View.MemoryView":460
10675  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
10676  *
10677  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
10678  * tmp = PyMem_Malloc(self.view.itemsize)
10679  * if tmp == NULL:
10680  */
10681  goto __pyx_L3;
10682  }
10683 
10684  /* "View.MemoryView":466
10685  * item = tmp
10686  * else:
10687  * item = <void *> array # <<<<<<<<<<<<<<
10688  *
10689  * try:
10690  */
10691  __Pyx_TraceLine(466,0,__PYX_ERR(1, 466, __pyx_L1_error))
10692  /*else*/ {
10693  __pyx_v_item = ((void *)__pyx_v_array);
10694  }
10695  __pyx_L3:;
10696 
10697  /* "View.MemoryView":468
10698  * item = <void *> array
10699  *
10700  * try: # <<<<<<<<<<<<<<
10701  * if self.dtype_is_object:
10702  * (<PyObject **> item)[0] = <PyObject *> value
10703  */
10704  __Pyx_TraceLine(468,0,__PYX_ERR(1, 468, __pyx_L1_error))
10705  /*try:*/ {
10706 
10707  /* "View.MemoryView":469
10708  *
10709  * try:
10710  * if self.dtype_is_object: # <<<<<<<<<<<<<<
10711  * (<PyObject **> item)[0] = <PyObject *> value
10712  * else:
10713  */
10714  __Pyx_TraceLine(469,0,__PYX_ERR(1, 469, __pyx_L6_error))
10715  __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
10716  if (__pyx_t_2) {
10717 
10718  /* "View.MemoryView":470
10719  * try:
10720  * if self.dtype_is_object:
10721  * (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
10722  * else:
10723  * self.assign_item_from_object(<char *> item, value)
10724  */
10725  __Pyx_TraceLine(470,0,__PYX_ERR(1, 470, __pyx_L6_error))
10726  (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
10727 
10728  /* "View.MemoryView":469
10729  *
10730  * try:
10731  * if self.dtype_is_object: # <<<<<<<<<<<<<<
10732  * (<PyObject **> item)[0] = <PyObject *> value
10733  * else:
10734  */
10735  goto __pyx_L8;
10736  }
10737 
10738  /* "View.MemoryView":472
10739  * (<PyObject **> item)[0] = <PyObject *> value
10740  * else:
10741  * self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
10742  *
10743  *
10744  */
10745  __Pyx_TraceLine(472,0,__PYX_ERR(1, 472, __pyx_L6_error))
10746  /*else*/ {
10747  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 472, __pyx_L6_error)
10748  __Pyx_GOTREF(__pyx_t_3);
10749  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10750  }
10751  __pyx_L8:;
10752 
10753  /* "View.MemoryView":476
10754  *
10755  *
10756  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
10757  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
10758  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
10759  */
10760  __Pyx_TraceLine(476,0,__PYX_ERR(1, 476, __pyx_L6_error))
10761  __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
10762  if (__pyx_t_2) {
10763 
10764  /* "View.MemoryView":477
10765  *
10766  * if self.view.suboffsets != NULL:
10767  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
10768  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
10769  * item, self.dtype_is_object)
10770  */
10771  __Pyx_TraceLine(477,0,__PYX_ERR(1, 477, __pyx_L6_error))
10772  __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 477, __pyx_L6_error)
10773  __Pyx_GOTREF(__pyx_t_3);
10774  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10775 
10776  /* "View.MemoryView":476
10777  *
10778  *
10779  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
10780  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
10781  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
10782  */
10783  }
10784 
10785  /* "View.MemoryView":478
10786  * if self.view.suboffsets != NULL:
10787  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
10788  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
10789  * item, self.dtype_is_object)
10790  * finally:
10791  */
10792  __Pyx_TraceLine(478,0,__PYX_ERR(1, 478, __pyx_L6_error))
10793  __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
10794  }
10795 
10796  /* "View.MemoryView":481
10797  * item, self.dtype_is_object)
10798  * finally:
10799  * PyMem_Free(tmp) # <<<<<<<<<<<<<<
10800  *
10801  * cdef setitem_indexed(self, index, value):
10802  */
10803  __Pyx_TraceLine(481,0,__PYX_ERR(1, 481, __pyx_L6_error))
10804  /*finally:*/ {
10805  /*normal exit:*/{
10806  PyMem_Free(__pyx_v_tmp);
10807  goto __pyx_L7;
10808  }
10809  __pyx_L6_error:;
10810  /*exception exit:*/{
10811  __Pyx_PyThreadState_declare
10812  __Pyx_PyThreadState_assign
10813  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
10814  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10815  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
10816  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
10817  __Pyx_XGOTREF(__pyx_t_7);
10818  __Pyx_XGOTREF(__pyx_t_8);
10819  __Pyx_XGOTREF(__pyx_t_9);
10820  __Pyx_XGOTREF(__pyx_t_10);
10821  __Pyx_XGOTREF(__pyx_t_11);
10822  __Pyx_XGOTREF(__pyx_t_12);
10823  __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
10824  {
10825  PyMem_Free(__pyx_v_tmp);
10826  }
10827  if (PY_MAJOR_VERSION >= 3) {
10828  __Pyx_XGIVEREF(__pyx_t_10);
10829  __Pyx_XGIVEREF(__pyx_t_11);
10830  __Pyx_XGIVEREF(__pyx_t_12);
10831  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
10832  }
10833  __Pyx_XGIVEREF(__pyx_t_7);
10834  __Pyx_XGIVEREF(__pyx_t_8);
10835  __Pyx_XGIVEREF(__pyx_t_9);
10836  __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
10837  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
10838  __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
10839  goto __pyx_L1_error;
10840  }
10841  __pyx_L7:;
10842  }
10843 
10844  /* "View.MemoryView":451
10845  * src.ndim, dst.ndim, self.dtype_is_object)
10846  *
10847  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
10848  * cdef int array[128]
10849  * cdef void *tmp = NULL
10850  */
10851 
10852  /* function exit code */
10853  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10854  goto __pyx_L0;
10855  __pyx_L1_error:;
10856  __Pyx_XDECREF(__pyx_t_3);
10857  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
10858  __pyx_r = 0;
10859  __pyx_L0:;
10860  __Pyx_XGIVEREF(__pyx_r);
10861  __Pyx_TraceReturn(__pyx_r, 0);
10862  __Pyx_RefNannyFinishContext();
10863  return __pyx_r;
10864 }
10865 
10866 /* "View.MemoryView":483
10867  * PyMem_Free(tmp)
10868  *
10869  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
10870  * cdef char *itemp = self.get_item_pointer(index)
10871  * self.assign_item_from_object(itemp, value)
10872  */
10873 
10874 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
10875  char *__pyx_v_itemp;
10876  PyObject *__pyx_r = NULL;
10877  __Pyx_TraceDeclarations
10878  __Pyx_RefNannyDeclarations
10879  char *__pyx_t_1;
10880  PyObject *__pyx_t_2 = NULL;
10881  int __pyx_lineno = 0;
10882  const char *__pyx_filename = NULL;
10883  int __pyx_clineno = 0;
10884  __Pyx_RefNannySetupContext("setitem_indexed", 0);
10885  __Pyx_TraceCall("setitem_indexed", __pyx_f[1], 483, 0, __PYX_ERR(1, 483, __pyx_L1_error));
10886 
10887  /* "View.MemoryView":484
10888  *
10889  * cdef setitem_indexed(self, index, value):
10890  * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
10891  * self.assign_item_from_object(itemp, value)
10892  *
10893  */
10894  __Pyx_TraceLine(484,0,__PYX_ERR(1, 484, __pyx_L1_error))
10895  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 484, __pyx_L1_error)
10896  __pyx_v_itemp = __pyx_t_1;
10897 
10898  /* "View.MemoryView":485
10899  * cdef setitem_indexed(self, index, value):
10900  * cdef char *itemp = self.get_item_pointer(index)
10901  * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
10902  *
10903  * cdef convert_item_to_object(self, char *itemp):
10904  */
10905  __Pyx_TraceLine(485,0,__PYX_ERR(1, 485, __pyx_L1_error))
10906  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 485, __pyx_L1_error)
10907  __Pyx_GOTREF(__pyx_t_2);
10908  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10909 
10910  /* "View.MemoryView":483
10911  * PyMem_Free(tmp)
10912  *
10913  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
10914  * cdef char *itemp = self.get_item_pointer(index)
10915  * self.assign_item_from_object(itemp, value)
10916  */
10917 
10918  /* function exit code */
10919  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10920  goto __pyx_L0;
10921  __pyx_L1_error:;
10922  __Pyx_XDECREF(__pyx_t_2);
10923  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
10924  __pyx_r = 0;
10925  __pyx_L0:;
10926  __Pyx_XGIVEREF(__pyx_r);
10927  __Pyx_TraceReturn(__pyx_r, 0);
10928  __Pyx_RefNannyFinishContext();
10929  return __pyx_r;
10930 }
10931 
10932 /* "View.MemoryView":487
10933  * self.assign_item_from_object(itemp, value)
10934  *
10935  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
10936  * """Only used if instantiated manually by the user, or if Cython doesn't
10937  * know how to convert the type"""
10938  */
10939 
10940 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
10941  PyObject *__pyx_v_struct = NULL;
10942  PyObject *__pyx_v_bytesitem = 0;
10943  PyObject *__pyx_v_result = NULL;
10944  PyObject *__pyx_r = NULL;
10945  __Pyx_TraceDeclarations
10946  __Pyx_RefNannyDeclarations
10947  PyObject *__pyx_t_1 = NULL;
10948  PyObject *__pyx_t_2 = NULL;
10949  PyObject *__pyx_t_3 = NULL;
10950  PyObject *__pyx_t_4 = NULL;
10951  PyObject *__pyx_t_5 = NULL;
10952  PyObject *__pyx_t_6 = NULL;
10953  PyObject *__pyx_t_7 = NULL;
10954  int __pyx_t_8;
10955  PyObject *__pyx_t_9 = NULL;
10956  size_t __pyx_t_10;
10957  int __pyx_t_11;
10958  int __pyx_lineno = 0;
10959  const char *__pyx_filename = NULL;
10960  int __pyx_clineno = 0;
10961  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
10962  __Pyx_TraceCall("convert_item_to_object", __pyx_f[1], 487, 0, __PYX_ERR(1, 487, __pyx_L1_error));
10963 
10964  /* "View.MemoryView":490
10965  * """Only used if instantiated manually by the user, or if Cython doesn't
10966  * know how to convert the type"""
10967  * import struct # <<<<<<<<<<<<<<
10968  * cdef bytes bytesitem
10969  *
10970  */
10971  __Pyx_TraceLine(490,0,__PYX_ERR(1, 490, __pyx_L1_error))
10972  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 490, __pyx_L1_error)
10973  __Pyx_GOTREF(__pyx_t_1);
10974  __pyx_v_struct = __pyx_t_1;
10975  __pyx_t_1 = 0;
10976 
10977  /* "View.MemoryView":493
10978  * cdef bytes bytesitem
10979  *
10980  * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
10981  * try:
10982  * result = struct.unpack(self.view.format, bytesitem)
10983  */
10984  __Pyx_TraceLine(493,0,__PYX_ERR(1, 493, __pyx_L1_error))
10985  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L1_error)
10986  __Pyx_GOTREF(__pyx_t_1);
10987  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
10988  __pyx_t_1 = 0;
10989 
10990  /* "View.MemoryView":494
10991  *
10992  * bytesitem = itemp[:self.view.itemsize]
10993  * try: # <<<<<<<<<<<<<<
10994  * result = struct.unpack(self.view.format, bytesitem)
10995  * except struct.error:
10996  */
10997  __Pyx_TraceLine(494,0,__PYX_ERR(1, 494, __pyx_L1_error))
10998  {
10999  __Pyx_PyThreadState_declare
11000  __Pyx_PyThreadState_assign
11001  __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
11002  __Pyx_XGOTREF(__pyx_t_2);
11003  __Pyx_XGOTREF(__pyx_t_3);
11004  __Pyx_XGOTREF(__pyx_t_4);
11005  /*try:*/ {
11006 
11007  /* "View.MemoryView":495
11008  * bytesitem = itemp[:self.view.itemsize]
11009  * try:
11010  * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
11011  * except struct.error:
11012  * raise ValueError("Unable to convert item to object")
11013  */
11014  __Pyx_TraceLine(495,0,__PYX_ERR(1, 495, __pyx_L3_error))
11015  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 495, __pyx_L3_error)
11016  __Pyx_GOTREF(__pyx_t_5);
11017  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 495, __pyx_L3_error)
11018  __Pyx_GOTREF(__pyx_t_6);
11019  __pyx_t_7 = NULL;
11020  __pyx_t_8 = 0;
11021  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
11022  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
11023  if (likely(__pyx_t_7)) {
11024  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
11025  __Pyx_INCREF(__pyx_t_7);
11026  __Pyx_INCREF(function);
11027  __Pyx_DECREF_SET(__pyx_t_5, function);
11028  __pyx_t_8 = 1;
11029  }
11030  }
11031  #if CYTHON_FAST_PYCALL
11032  if (PyFunction_Check(__pyx_t_5)) {
11033  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
11034  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
11035  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11036  __Pyx_GOTREF(__pyx_t_1);
11037  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11038  } else
11039  #endif
11040  #if CYTHON_FAST_PYCCALL
11041  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
11042  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
11043  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
11044  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11045  __Pyx_GOTREF(__pyx_t_1);
11046  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11047  } else
11048  #endif
11049  {
11050  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 495, __pyx_L3_error)
11051  __Pyx_GOTREF(__pyx_t_9);
11052  if (__pyx_t_7) {
11053  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
11054  }
11055  __Pyx_GIVEREF(__pyx_t_6);
11056  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
11057  __Pyx_INCREF(__pyx_v_bytesitem);
11058  __Pyx_GIVEREF(__pyx_v_bytesitem);
11059  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
11060  __pyx_t_6 = 0;
11061  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L3_error)
11062  __Pyx_GOTREF(__pyx_t_1);
11063  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
11064  }
11065  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11066  __pyx_v_result = __pyx_t_1;
11067  __pyx_t_1 = 0;
11068 
11069  /* "View.MemoryView":494
11070  *
11071  * bytesitem = itemp[:self.view.itemsize]
11072  * try: # <<<<<<<<<<<<<<
11073  * result = struct.unpack(self.view.format, bytesitem)
11074  * except struct.error:
11075  */
11076  }
11077 
11078  /* "View.MemoryView":499
11079  * raise ValueError("Unable to convert item to object")
11080  * else:
11081  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
11082  * return result[0]
11083  * return result
11084  */
11085  __Pyx_TraceLine(499,0,__PYX_ERR(1, 499, __pyx_L5_except_error))
11086  /*else:*/ {
11087  __pyx_t_10 = strlen(__pyx_v_self->view.format);
11088  __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
11089  if (__pyx_t_11) {
11090 
11091  /* "View.MemoryView":500
11092  * else:
11093  * if len(self.view.format) == 1:
11094  * return result[0] # <<<<<<<<<<<<<<
11095  * return result
11096  *
11097  */
11098  __Pyx_TraceLine(500,0,__PYX_ERR(1, 500, __pyx_L5_except_error))
11099  __Pyx_XDECREF(__pyx_r);
11100  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L5_except_error)
11101  __Pyx_GOTREF(__pyx_t_1);
11102  __pyx_r = __pyx_t_1;
11103  __pyx_t_1 = 0;
11104  goto __pyx_L6_except_return;
11105 
11106  /* "View.MemoryView":499
11107  * raise ValueError("Unable to convert item to object")
11108  * else:
11109  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
11110  * return result[0]
11111  * return result
11112  */
11113  }
11114 
11115  /* "View.MemoryView":501
11116  * if len(self.view.format) == 1:
11117  * return result[0]
11118  * return result # <<<<<<<<<<<<<<
11119  *
11120  * cdef assign_item_from_object(self, char *itemp, object value):
11121  */
11122  __Pyx_TraceLine(501,0,__PYX_ERR(1, 501, __pyx_L5_except_error))
11123  __Pyx_XDECREF(__pyx_r);
11124  __Pyx_INCREF(__pyx_v_result);
11125  __pyx_r = __pyx_v_result;
11126  goto __pyx_L6_except_return;
11127  }
11128  __pyx_L3_error:;
11129  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11130  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11131  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11132  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11133  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
11134 
11135  /* "View.MemoryView":496
11136  * try:
11137  * result = struct.unpack(self.view.format, bytesitem)
11138  * except struct.error: # <<<<<<<<<<<<<<
11139  * raise ValueError("Unable to convert item to object")
11140  * else:
11141  */
11142  __Pyx_TraceLine(496,0,__PYX_ERR(1, 496, __pyx_L5_except_error))
11143  __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
11144  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 496, __pyx_L5_except_error)
11145  __Pyx_GOTREF(__pyx_t_6);
11146  __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
11147  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11148  __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
11149  __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
11150  if (__pyx_t_8) {
11151  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
11152  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 496, __pyx_L5_except_error)
11153  __Pyx_GOTREF(__pyx_t_9);
11154  __Pyx_GOTREF(__pyx_t_5);
11155  __Pyx_GOTREF(__pyx_t_1);
11156 
11157  /* "View.MemoryView":497
11158  * result = struct.unpack(self.view.format, bytesitem)
11159  * except struct.error:
11160  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
11161  * else:
11162  * if len(self.view.format) == 1:
11163  */
11164  __Pyx_TraceLine(497,0,__PYX_ERR(1, 497, __pyx_L5_except_error))
11165  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L5_except_error)
11166  __Pyx_GOTREF(__pyx_t_6);
11167  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
11168  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11169  __PYX_ERR(1, 497, __pyx_L5_except_error)
11170  }
11171  goto __pyx_L5_except_error;
11172  __pyx_L5_except_error:;
11173 
11174  /* "View.MemoryView":494
11175  *
11176  * bytesitem = itemp[:self.view.itemsize]
11177  * try: # <<<<<<<<<<<<<<
11178  * result = struct.unpack(self.view.format, bytesitem)
11179  * except struct.error:
11180  */
11181  __Pyx_XGIVEREF(__pyx_t_2);
11182  __Pyx_XGIVEREF(__pyx_t_3);
11183  __Pyx_XGIVEREF(__pyx_t_4);
11184  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
11185  goto __pyx_L1_error;
11186  __pyx_L6_except_return:;
11187  __Pyx_XGIVEREF(__pyx_t_2);
11188  __Pyx_XGIVEREF(__pyx_t_3);
11189  __Pyx_XGIVEREF(__pyx_t_4);
11190  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
11191  goto __pyx_L0;
11192  }
11193 
11194  /* "View.MemoryView":487
11195  * self.assign_item_from_object(itemp, value)
11196  *
11197  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
11198  * """Only used if instantiated manually by the user, or if Cython doesn't
11199  * know how to convert the type"""
11200  */
11201 
11202  /* function exit code */
11203  __pyx_L1_error:;
11204  __Pyx_XDECREF(__pyx_t_1);
11205  __Pyx_XDECREF(__pyx_t_5);
11206  __Pyx_XDECREF(__pyx_t_6);
11207  __Pyx_XDECREF(__pyx_t_7);
11208  __Pyx_XDECREF(__pyx_t_9);
11209  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
11210  __pyx_r = 0;
11211  __pyx_L0:;
11212  __Pyx_XDECREF(__pyx_v_struct);
11213  __Pyx_XDECREF(__pyx_v_bytesitem);
11214  __Pyx_XDECREF(__pyx_v_result);
11215  __Pyx_XGIVEREF(__pyx_r);
11216  __Pyx_TraceReturn(__pyx_r, 0);
11217  __Pyx_RefNannyFinishContext();
11218  return __pyx_r;
11219 }
11220 
11221 /* "View.MemoryView":503
11222  * return result
11223  *
11224  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
11225  * """Only used if instantiated manually by the user, or if Cython doesn't
11226  * know how to convert the type"""
11227  */
11228 
11229 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
11230  PyObject *__pyx_v_struct = NULL;
11231  char __pyx_v_c;
11232  PyObject *__pyx_v_bytesvalue = 0;
11233  Py_ssize_t __pyx_v_i;
11234  PyObject *__pyx_r = NULL;
11235  __Pyx_TraceDeclarations
11236  __Pyx_RefNannyDeclarations
11237  PyObject *__pyx_t_1 = NULL;
11238  int __pyx_t_2;
11239  int __pyx_t_3;
11240  PyObject *__pyx_t_4 = NULL;
11241  PyObject *__pyx_t_5 = NULL;
11242  PyObject *__pyx_t_6 = NULL;
11243  int __pyx_t_7;
11244  PyObject *__pyx_t_8 = NULL;
11245  Py_ssize_t __pyx_t_9;
11246  PyObject *__pyx_t_10 = NULL;
11247  char *__pyx_t_11;
11248  char *__pyx_t_12;
11249  char *__pyx_t_13;
11250  char *__pyx_t_14;
11251  int __pyx_lineno = 0;
11252  const char *__pyx_filename = NULL;
11253  int __pyx_clineno = 0;
11254  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
11255  __Pyx_TraceCall("assign_item_from_object", __pyx_f[1], 503, 0, __PYX_ERR(1, 503, __pyx_L1_error));
11256 
11257  /* "View.MemoryView":506
11258  * """Only used if instantiated manually by the user, or if Cython doesn't
11259  * know how to convert the type"""
11260  * import struct # <<<<<<<<<<<<<<
11261  * cdef char c
11262  * cdef bytes bytesvalue
11263  */
11264  __Pyx_TraceLine(506,0,__PYX_ERR(1, 506, __pyx_L1_error))
11265  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error)
11266  __Pyx_GOTREF(__pyx_t_1);
11267  __pyx_v_struct = __pyx_t_1;
11268  __pyx_t_1 = 0;
11269 
11270  /* "View.MemoryView":511
11271  * cdef Py_ssize_t i
11272  *
11273  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
11274  * bytesvalue = struct.pack(self.view.format, *value)
11275  * else:
11276  */
11277  __Pyx_TraceLine(511,0,__PYX_ERR(1, 511, __pyx_L1_error))
11278  __pyx_t_2 = PyTuple_Check(__pyx_v_value);
11279  __pyx_t_3 = (__pyx_t_2 != 0);
11280  if (__pyx_t_3) {
11281 
11282  /* "View.MemoryView":512
11283  *
11284  * if isinstance(value, tuple):
11285  * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
11286  * else:
11287  * bytesvalue = struct.pack(self.view.format, value)
11288  */
11289  __Pyx_TraceLine(512,0,__PYX_ERR(1, 512, __pyx_L1_error))
11290  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error)
11291  __Pyx_GOTREF(__pyx_t_1);
11292  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
11293  __Pyx_GOTREF(__pyx_t_4);
11294  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 512, __pyx_L1_error)
11295  __Pyx_GOTREF(__pyx_t_5);
11296  __Pyx_GIVEREF(__pyx_t_4);
11297  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
11298  __pyx_t_4 = 0;
11299  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
11300  __Pyx_GOTREF(__pyx_t_4);
11301  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 512, __pyx_L1_error)
11302  __Pyx_GOTREF(__pyx_t_6);
11303  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11304  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11305  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
11306  __Pyx_GOTREF(__pyx_t_4);
11307  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11308  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11309  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 512, __pyx_L1_error)
11310  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
11311  __pyx_t_4 = 0;
11312 
11313  /* "View.MemoryView":511
11314  * cdef Py_ssize_t i
11315  *
11316  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
11317  * bytesvalue = struct.pack(self.view.format, *value)
11318  * else:
11319  */
11320  goto __pyx_L3;
11321  }
11322 
11323  /* "View.MemoryView":514
11324  * bytesvalue = struct.pack(self.view.format, *value)
11325  * else:
11326  * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
11327  *
11328  * for i, c in enumerate(bytesvalue):
11329  */
11330  __Pyx_TraceLine(514,0,__PYX_ERR(1, 514, __pyx_L1_error))
11331  /*else*/ {
11332  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 514, __pyx_L1_error)
11333  __Pyx_GOTREF(__pyx_t_6);
11334  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
11335  __Pyx_GOTREF(__pyx_t_1);
11336  __pyx_t_5 = NULL;
11337  __pyx_t_7 = 0;
11338  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
11339  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
11340  if (likely(__pyx_t_5)) {
11341  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
11342  __Pyx_INCREF(__pyx_t_5);
11343  __Pyx_INCREF(function);
11344  __Pyx_DECREF_SET(__pyx_t_6, function);
11345  __pyx_t_7 = 1;
11346  }
11347  }
11348  #if CYTHON_FAST_PYCALL
11349  if (PyFunction_Check(__pyx_t_6)) {
11350  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
11351  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
11352  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11353  __Pyx_GOTREF(__pyx_t_4);
11354  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11355  } else
11356  #endif
11357  #if CYTHON_FAST_PYCCALL
11358  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
11359  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
11360  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
11361  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
11362  __Pyx_GOTREF(__pyx_t_4);
11363  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11364  } else
11365  #endif
11366  {
11367  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 514, __pyx_L1_error)
11368  __Pyx_GOTREF(__pyx_t_8);
11369  if (__pyx_t_5) {
11370  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
11371  }
11372  __Pyx_GIVEREF(__pyx_t_1);
11373  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
11374  __Pyx_INCREF(__pyx_v_value);
11375  __Pyx_GIVEREF(__pyx_v_value);
11376  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
11377  __pyx_t_1 = 0;
11378  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
11379  __Pyx_GOTREF(__pyx_t_4);
11380  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
11381  }
11382  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11383  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(1, 514, __pyx_L1_error)
11384  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
11385  __pyx_t_4 = 0;
11386  }
11387  __pyx_L3:;
11388 
11389  /* "View.MemoryView":516
11390  * bytesvalue = struct.pack(self.view.format, value)
11391  *
11392  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
11393  * itemp[i] = c
11394  *
11395  */
11396  __Pyx_TraceLine(516,0,__PYX_ERR(1, 516, __pyx_L1_error))
11397  __pyx_t_9 = 0;
11398  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
11399  PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
11400  __PYX_ERR(1, 516, __pyx_L1_error)
11401  }
11402  __Pyx_INCREF(__pyx_v_bytesvalue);
11403  __pyx_t_10 = __pyx_v_bytesvalue;
11404  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
11405  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
11406  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
11407  __pyx_t_11 = __pyx_t_14;
11408  __pyx_v_c = (__pyx_t_11[0]);
11409 
11410  /* "View.MemoryView":517
11411  *
11412  * for i, c in enumerate(bytesvalue):
11413  * itemp[i] = c # <<<<<<<<<<<<<<
11414  *
11415  * @cname('getbuffer')
11416  */
11417  __Pyx_TraceLine(517,0,__PYX_ERR(1, 517, __pyx_L1_error))
11418  __pyx_v_i = __pyx_t_9;
11419 
11420  /* "View.MemoryView":516
11421  * bytesvalue = struct.pack(self.view.format, value)
11422  *
11423  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
11424  * itemp[i] = c
11425  *
11426  */
11427  __Pyx_TraceLine(516,0,__PYX_ERR(1, 516, __pyx_L1_error))
11428  __pyx_t_9 = (__pyx_t_9 + 1);
11429 
11430  /* "View.MemoryView":517
11431  *
11432  * for i, c in enumerate(bytesvalue):
11433  * itemp[i] = c # <<<<<<<<<<<<<<
11434  *
11435  * @cname('getbuffer')
11436  */
11437  __Pyx_TraceLine(517,0,__PYX_ERR(1, 517, __pyx_L1_error))
11438  (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
11439  }
11440  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11441 
11442  /* "View.MemoryView":503
11443  * return result
11444  *
11445  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
11446  * """Only used if instantiated manually by the user, or if Cython doesn't
11447  * know how to convert the type"""
11448  */
11449 
11450  /* function exit code */
11451  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11452  goto __pyx_L0;
11453  __pyx_L1_error:;
11454  __Pyx_XDECREF(__pyx_t_1);
11455  __Pyx_XDECREF(__pyx_t_4);
11456  __Pyx_XDECREF(__pyx_t_5);
11457  __Pyx_XDECREF(__pyx_t_6);
11458  __Pyx_XDECREF(__pyx_t_8);
11459  __Pyx_XDECREF(__pyx_t_10);
11460  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
11461  __pyx_r = 0;
11462  __pyx_L0:;
11463  __Pyx_XDECREF(__pyx_v_struct);
11464  __Pyx_XDECREF(__pyx_v_bytesvalue);
11465  __Pyx_XGIVEREF(__pyx_r);
11466  __Pyx_TraceReturn(__pyx_r, 0);
11467  __Pyx_RefNannyFinishContext();
11468  return __pyx_r;
11469 }
11470 
11471 /* "View.MemoryView":520
11472  *
11473  * @cname('getbuffer')
11474  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
11475  * if flags & PyBUF_WRITABLE and self.view.readonly:
11476  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11477  */
11478 
11479 /* Python wrapper */
11480 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
11481 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
11482  int __pyx_r;
11483  __Pyx_RefNannyDeclarations
11484  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
11485  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
11486 
11487  /* function exit code */
11488  __Pyx_RefNannyFinishContext();
11489  return __pyx_r;
11490 }
11491 
11492 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
11493  int __pyx_r;
11494  __Pyx_TraceDeclarations
11495  __Pyx_RefNannyDeclarations
11496  int __pyx_t_1;
11497  int __pyx_t_2;
11498  PyObject *__pyx_t_3 = NULL;
11499  Py_ssize_t *__pyx_t_4;
11500  char *__pyx_t_5;
11501  void *__pyx_t_6;
11502  int __pyx_t_7;
11503  Py_ssize_t __pyx_t_8;
11504  int __pyx_lineno = 0;
11505  const char *__pyx_filename = NULL;
11506  int __pyx_clineno = 0;
11507  if (__pyx_v_info == NULL) {
11508  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
11509  return -1;
11510  }
11511  __Pyx_RefNannySetupContext("__getbuffer__", 0);
11512  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
11513  __Pyx_GIVEREF(__pyx_v_info->obj);
11514  __Pyx_TraceCall("__getbuffer__", __pyx_f[1], 520, 0, __PYX_ERR(1, 520, __pyx_L1_error));
11515 
11516  /* "View.MemoryView":521
11517  * @cname('getbuffer')
11518  * def __getbuffer__(self, Py_buffer *info, int flags):
11519  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
11520  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11521  *
11522  */
11523  __Pyx_TraceLine(521,0,__PYX_ERR(1, 521, __pyx_L1_error))
11524  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
11525  if (__pyx_t_2) {
11526  } else {
11527  __pyx_t_1 = __pyx_t_2;
11528  goto __pyx_L4_bool_binop_done;
11529  }
11530  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
11531  __pyx_t_1 = __pyx_t_2;
11532  __pyx_L4_bool_binop_done:;
11533  if (unlikely(__pyx_t_1)) {
11534 
11535  /* "View.MemoryView":522
11536  * def __getbuffer__(self, Py_buffer *info, int flags):
11537  * if flags & PyBUF_WRITABLE and self.view.readonly:
11538  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
11539  *
11540  * if flags & PyBUF_ND:
11541  */
11542  __Pyx_TraceLine(522,0,__PYX_ERR(1, 522, __pyx_L1_error))
11543  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 522, __pyx_L1_error)
11544  __Pyx_GOTREF(__pyx_t_3);
11545  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
11546  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11547  __PYX_ERR(1, 522, __pyx_L1_error)
11548 
11549  /* "View.MemoryView":521
11550  * @cname('getbuffer')
11551  * def __getbuffer__(self, Py_buffer *info, int flags):
11552  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
11553  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11554  *
11555  */
11556  }
11557 
11558  /* "View.MemoryView":524
11559  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11560  *
11561  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
11562  * info.shape = self.view.shape
11563  * else:
11564  */
11565  __Pyx_TraceLine(524,0,__PYX_ERR(1, 524, __pyx_L1_error))
11566  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
11567  if (__pyx_t_1) {
11568 
11569  /* "View.MemoryView":525
11570  *
11571  * if flags & PyBUF_ND:
11572  * info.shape = self.view.shape # <<<<<<<<<<<<<<
11573  * else:
11574  * info.shape = NULL
11575  */
11576  __Pyx_TraceLine(525,0,__PYX_ERR(1, 525, __pyx_L1_error))
11577  __pyx_t_4 = __pyx_v_self->view.shape;
11578  __pyx_v_info->shape = __pyx_t_4;
11579 
11580  /* "View.MemoryView":524
11581  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11582  *
11583  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
11584  * info.shape = self.view.shape
11585  * else:
11586  */
11587  goto __pyx_L6;
11588  }
11589 
11590  /* "View.MemoryView":527
11591  * info.shape = self.view.shape
11592  * else:
11593  * info.shape = NULL # <<<<<<<<<<<<<<
11594  *
11595  * if flags & PyBUF_STRIDES:
11596  */
11597  __Pyx_TraceLine(527,0,__PYX_ERR(1, 527, __pyx_L1_error))
11598  /*else*/ {
11599  __pyx_v_info->shape = NULL;
11600  }
11601  __pyx_L6:;
11602 
11603  /* "View.MemoryView":529
11604  * info.shape = NULL
11605  *
11606  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
11607  * info.strides = self.view.strides
11608  * else:
11609  */
11610  __Pyx_TraceLine(529,0,__PYX_ERR(1, 529, __pyx_L1_error))
11611  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
11612  if (__pyx_t_1) {
11613 
11614  /* "View.MemoryView":530
11615  *
11616  * if flags & PyBUF_STRIDES:
11617  * info.strides = self.view.strides # <<<<<<<<<<<<<<
11618  * else:
11619  * info.strides = NULL
11620  */
11621  __Pyx_TraceLine(530,0,__PYX_ERR(1, 530, __pyx_L1_error))
11622  __pyx_t_4 = __pyx_v_self->view.strides;
11623  __pyx_v_info->strides = __pyx_t_4;
11624 
11625  /* "View.MemoryView":529
11626  * info.shape = NULL
11627  *
11628  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
11629  * info.strides = self.view.strides
11630  * else:
11631  */
11632  goto __pyx_L7;
11633  }
11634 
11635  /* "View.MemoryView":532
11636  * info.strides = self.view.strides
11637  * else:
11638  * info.strides = NULL # <<<<<<<<<<<<<<
11639  *
11640  * if flags & PyBUF_INDIRECT:
11641  */
11642  __Pyx_TraceLine(532,0,__PYX_ERR(1, 532, __pyx_L1_error))
11643  /*else*/ {
11644  __pyx_v_info->strides = NULL;
11645  }
11646  __pyx_L7:;
11647 
11648  /* "View.MemoryView":534
11649  * info.strides = NULL
11650  *
11651  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
11652  * info.suboffsets = self.view.suboffsets
11653  * else:
11654  */
11655  __Pyx_TraceLine(534,0,__PYX_ERR(1, 534, __pyx_L1_error))
11656  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
11657  if (__pyx_t_1) {
11658 
11659  /* "View.MemoryView":535
11660  *
11661  * if flags & PyBUF_INDIRECT:
11662  * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
11663  * else:
11664  * info.suboffsets = NULL
11665  */
11666  __Pyx_TraceLine(535,0,__PYX_ERR(1, 535, __pyx_L1_error))
11667  __pyx_t_4 = __pyx_v_self->view.suboffsets;
11668  __pyx_v_info->suboffsets = __pyx_t_4;
11669 
11670  /* "View.MemoryView":534
11671  * info.strides = NULL
11672  *
11673  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
11674  * info.suboffsets = self.view.suboffsets
11675  * else:
11676  */
11677  goto __pyx_L8;
11678  }
11679 
11680  /* "View.MemoryView":537
11681  * info.suboffsets = self.view.suboffsets
11682  * else:
11683  * info.suboffsets = NULL # <<<<<<<<<<<<<<
11684  *
11685  * if flags & PyBUF_FORMAT:
11686  */
11687  __Pyx_TraceLine(537,0,__PYX_ERR(1, 537, __pyx_L1_error))
11688  /*else*/ {
11689  __pyx_v_info->suboffsets = NULL;
11690  }
11691  __pyx_L8:;
11692 
11693  /* "View.MemoryView":539
11694  * info.suboffsets = NULL
11695  *
11696  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
11697  * info.format = self.view.format
11698  * else:
11699  */
11700  __Pyx_TraceLine(539,0,__PYX_ERR(1, 539, __pyx_L1_error))
11701  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
11702  if (__pyx_t_1) {
11703 
11704  /* "View.MemoryView":540
11705  *
11706  * if flags & PyBUF_FORMAT:
11707  * info.format = self.view.format # <<<<<<<<<<<<<<
11708  * else:
11709  * info.format = NULL
11710  */
11711  __Pyx_TraceLine(540,0,__PYX_ERR(1, 540, __pyx_L1_error))
11712  __pyx_t_5 = __pyx_v_self->view.format;
11713  __pyx_v_info->format = __pyx_t_5;
11714 
11715  /* "View.MemoryView":539
11716  * info.suboffsets = NULL
11717  *
11718  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
11719  * info.format = self.view.format
11720  * else:
11721  */
11722  goto __pyx_L9;
11723  }
11724 
11725  /* "View.MemoryView":542
11726  * info.format = self.view.format
11727  * else:
11728  * info.format = NULL # <<<<<<<<<<<<<<
11729  *
11730  * info.buf = self.view.buf
11731  */
11732  __Pyx_TraceLine(542,0,__PYX_ERR(1, 542, __pyx_L1_error))
11733  /*else*/ {
11734  __pyx_v_info->format = NULL;
11735  }
11736  __pyx_L9:;
11737 
11738  /* "View.MemoryView":544
11739  * info.format = NULL
11740  *
11741  * info.buf = self.view.buf # <<<<<<<<<<<<<<
11742  * info.ndim = self.view.ndim
11743  * info.itemsize = self.view.itemsize
11744  */
11745  __Pyx_TraceLine(544,0,__PYX_ERR(1, 544, __pyx_L1_error))
11746  __pyx_t_6 = __pyx_v_self->view.buf;
11747  __pyx_v_info->buf = __pyx_t_6;
11748 
11749  /* "View.MemoryView":545
11750  *
11751  * info.buf = self.view.buf
11752  * info.ndim = self.view.ndim # <<<<<<<<<<<<<<
11753  * info.itemsize = self.view.itemsize
11754  * info.len = self.view.len
11755  */
11756  __Pyx_TraceLine(545,0,__PYX_ERR(1, 545, __pyx_L1_error))
11757  __pyx_t_7 = __pyx_v_self->view.ndim;
11758  __pyx_v_info->ndim = __pyx_t_7;
11759 
11760  /* "View.MemoryView":546
11761  * info.buf = self.view.buf
11762  * info.ndim = self.view.ndim
11763  * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
11764  * info.len = self.view.len
11765  * info.readonly = self.view.readonly
11766  */
11767  __Pyx_TraceLine(546,0,__PYX_ERR(1, 546, __pyx_L1_error))
11768  __pyx_t_8 = __pyx_v_self->view.itemsize;
11769  __pyx_v_info->itemsize = __pyx_t_8;
11770 
11771  /* "View.MemoryView":547
11772  * info.ndim = self.view.ndim
11773  * info.itemsize = self.view.itemsize
11774  * info.len = self.view.len # <<<<<<<<<<<<<<
11775  * info.readonly = self.view.readonly
11776  * info.obj = self
11777  */
11778  __Pyx_TraceLine(547,0,__PYX_ERR(1, 547, __pyx_L1_error))
11779  __pyx_t_8 = __pyx_v_self->view.len;
11780  __pyx_v_info->len = __pyx_t_8;
11781 
11782  /* "View.MemoryView":548
11783  * info.itemsize = self.view.itemsize
11784  * info.len = self.view.len
11785  * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
11786  * info.obj = self
11787  *
11788  */
11789  __Pyx_TraceLine(548,0,__PYX_ERR(1, 548, __pyx_L1_error))
11790  __pyx_t_1 = __pyx_v_self->view.readonly;
11791  __pyx_v_info->readonly = __pyx_t_1;
11792 
11793  /* "View.MemoryView":549
11794  * info.len = self.view.len
11795  * info.readonly = self.view.readonly
11796  * info.obj = self # <<<<<<<<<<<<<<
11797  *
11798  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
11799  */
11800  __Pyx_TraceLine(549,0,__PYX_ERR(1, 549, __pyx_L1_error))
11801  __Pyx_INCREF(((PyObject *)__pyx_v_self));
11802  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
11803  __Pyx_GOTREF(__pyx_v_info->obj);
11804  __Pyx_DECREF(__pyx_v_info->obj);
11805  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
11806 
11807  /* "View.MemoryView":520
11808  *
11809  * @cname('getbuffer')
11810  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
11811  * if flags & PyBUF_WRITABLE and self.view.readonly:
11812  * raise ValueError("Cannot create writable memory view from read-only memoryview")
11813  */
11814 
11815  /* function exit code */
11816  __pyx_r = 0;
11817  goto __pyx_L0;
11818  __pyx_L1_error:;
11819  __Pyx_XDECREF(__pyx_t_3);
11820  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11821  __pyx_r = -1;
11822  if (__pyx_v_info->obj != NULL) {
11823  __Pyx_GOTREF(__pyx_v_info->obj);
11824  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
11825  }
11826  goto __pyx_L2;
11827  __pyx_L0:;
11828  if (__pyx_v_info->obj == Py_None) {
11829  __Pyx_GOTREF(__pyx_v_info->obj);
11830  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
11831  }
11832  __pyx_L2:;
11833  __Pyx_TraceReturn(Py_None, 0);
11834  __Pyx_RefNannyFinishContext();
11835  return __pyx_r;
11836 }
11837 
11838 /* "View.MemoryView":555
11839  *
11840  * @property
11841  * def T(self): # <<<<<<<<<<<<<<
11842  * cdef _memoryviewslice result = memoryview_copy(self)
11843  * transpose_memslice(&result.from_slice)
11844  */
11845 
11846 /* Python wrapper */
11847 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
11848 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
11849  PyObject *__pyx_r = 0;
11850  __Pyx_RefNannyDeclarations
11851  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11852  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11853 
11854  /* function exit code */
11855  __Pyx_RefNannyFinishContext();
11856  return __pyx_r;
11857 }
11858 
11859 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11860  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
11861  PyObject *__pyx_r = NULL;
11862  __Pyx_TraceDeclarations
11863  __Pyx_RefNannyDeclarations
11864  PyObject *__pyx_t_1 = NULL;
11865  int __pyx_t_2;
11866  int __pyx_lineno = 0;
11867  const char *__pyx_filename = NULL;
11868  int __pyx_clineno = 0;
11869  __Pyx_RefNannySetupContext("__get__", 0);
11870  __Pyx_TraceCall("__get__", __pyx_f[1], 555, 0, __PYX_ERR(1, 555, __pyx_L1_error));
11871 
11872  /* "View.MemoryView":556
11873  * @property
11874  * def T(self):
11875  * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
11876  * transpose_memslice(&result.from_slice)
11877  * return result
11878  */
11879  __Pyx_TraceLine(556,0,__PYX_ERR(1, 556, __pyx_L1_error))
11880  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
11881  __Pyx_GOTREF(__pyx_t_1);
11882  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error)
11883  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
11884  __pyx_t_1 = 0;
11885 
11886  /* "View.MemoryView":557
11887  * def T(self):
11888  * cdef _memoryviewslice result = memoryview_copy(self)
11889  * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
11890  * return result
11891  *
11892  */
11893  __Pyx_TraceLine(557,0,__PYX_ERR(1, 557, __pyx_L1_error))
11894  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 557, __pyx_L1_error)
11895 
11896  /* "View.MemoryView":558
11897  * cdef _memoryviewslice result = memoryview_copy(self)
11898  * transpose_memslice(&result.from_slice)
11899  * return result # <<<<<<<<<<<<<<
11900  *
11901  * @property
11902  */
11903  __Pyx_TraceLine(558,0,__PYX_ERR(1, 558, __pyx_L1_error))
11904  __Pyx_XDECREF(__pyx_r);
11905  __Pyx_INCREF(((PyObject *)__pyx_v_result));
11906  __pyx_r = ((PyObject *)__pyx_v_result);
11907  goto __pyx_L0;
11908 
11909  /* "View.MemoryView":555
11910  *
11911  * @property
11912  * def T(self): # <<<<<<<<<<<<<<
11913  * cdef _memoryviewslice result = memoryview_copy(self)
11914  * transpose_memslice(&result.from_slice)
11915  */
11916 
11917  /* function exit code */
11918  __pyx_L1_error:;
11919  __Pyx_XDECREF(__pyx_t_1);
11920  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11921  __pyx_r = NULL;
11922  __pyx_L0:;
11923  __Pyx_XDECREF((PyObject *)__pyx_v_result);
11924  __Pyx_XGIVEREF(__pyx_r);
11925  __Pyx_TraceReturn(__pyx_r, 0);
11926  __Pyx_RefNannyFinishContext();
11927  return __pyx_r;
11928 }
11929 
11930 /* "View.MemoryView":561
11931  *
11932  * @property
11933  * def base(self): # <<<<<<<<<<<<<<
11934  * return self.obj
11935  *
11936  */
11937 
11938 /* Python wrapper */
11939 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
11940 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
11941  PyObject *__pyx_r = 0;
11942  __Pyx_RefNannyDeclarations
11943  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
11944  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
11945 
11946  /* function exit code */
11947  __Pyx_RefNannyFinishContext();
11948  return __pyx_r;
11949 }
11950 
11951 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
11952  PyObject *__pyx_r = NULL;
11953  __Pyx_TraceDeclarations
11954  __Pyx_RefNannyDeclarations
11955  int __pyx_lineno = 0;
11956  const char *__pyx_filename = NULL;
11957  int __pyx_clineno = 0;
11958  __Pyx_RefNannySetupContext("__get__", 0);
11959  __Pyx_TraceCall("__get__", __pyx_f[1], 561, 0, __PYX_ERR(1, 561, __pyx_L1_error));
11960 
11961  /* "View.MemoryView":562
11962  * @property
11963  * def base(self):
11964  * return self.obj # <<<<<<<<<<<<<<
11965  *
11966  * @property
11967  */
11968  __Pyx_TraceLine(562,0,__PYX_ERR(1, 562, __pyx_L1_error))
11969  __Pyx_XDECREF(__pyx_r);
11970  __Pyx_INCREF(__pyx_v_self->obj);
11971  __pyx_r = __pyx_v_self->obj;
11972  goto __pyx_L0;
11973 
11974  /* "View.MemoryView":561
11975  *
11976  * @property
11977  * def base(self): # <<<<<<<<<<<<<<
11978  * return self.obj
11979  *
11980  */
11981 
11982  /* function exit code */
11983  __pyx_L1_error:;
11984  __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11985  __pyx_r = NULL;
11986  __pyx_L0:;
11987  __Pyx_XGIVEREF(__pyx_r);
11988  __Pyx_TraceReturn(__pyx_r, 0);
11989  __Pyx_RefNannyFinishContext();
11990  return __pyx_r;
11991 }
11992 
11993 /* "View.MemoryView":565
11994  *
11995  * @property
11996  * def shape(self): # <<<<<<<<<<<<<<
11997  * return tuple([length for length in self.view.shape[:self.view.ndim]])
11998  *
11999  */
12000 
12001 /* Python wrapper */
12002 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
12003 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
12004  PyObject *__pyx_r = 0;
12005  __Pyx_RefNannyDeclarations
12006  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12007  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12008 
12009  /* function exit code */
12010  __Pyx_RefNannyFinishContext();
12011  return __pyx_r;
12012 }
12013 
12014 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12015  Py_ssize_t __pyx_v_length;
12016  PyObject *__pyx_r = NULL;
12017  __Pyx_TraceDeclarations
12018  __Pyx_RefNannyDeclarations
12019  PyObject *__pyx_t_1 = NULL;
12020  Py_ssize_t *__pyx_t_2;
12021  Py_ssize_t *__pyx_t_3;
12022  Py_ssize_t *__pyx_t_4;
12023  PyObject *__pyx_t_5 = NULL;
12024  int __pyx_lineno = 0;
12025  const char *__pyx_filename = NULL;
12026  int __pyx_clineno = 0;
12027  __Pyx_RefNannySetupContext("__get__", 0);
12028  __Pyx_TraceCall("__get__", __pyx_f[1], 565, 0, __PYX_ERR(1, 565, __pyx_L1_error));
12029 
12030  /* "View.MemoryView":566
12031  * @property
12032  * def shape(self):
12033  * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
12034  *
12035  * @property
12036  */
12037  __Pyx_TraceLine(566,0,__PYX_ERR(1, 566, __pyx_L1_error))
12038  __Pyx_XDECREF(__pyx_r);
12039  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error)
12040  __Pyx_GOTREF(__pyx_t_1);
12041  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
12042  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
12043  __pyx_t_2 = __pyx_t_4;
12044  __pyx_v_length = (__pyx_t_2[0]);
12045  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 566, __pyx_L1_error)
12046  __Pyx_GOTREF(__pyx_t_5);
12047  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 566, __pyx_L1_error)
12048  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12049  }
12050  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 566, __pyx_L1_error)
12051  __Pyx_GOTREF(__pyx_t_5);
12052  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12053  __pyx_r = __pyx_t_5;
12054  __pyx_t_5 = 0;
12055  goto __pyx_L0;
12056 
12057  /* "View.MemoryView":565
12058  *
12059  * @property
12060  * def shape(self): # <<<<<<<<<<<<<<
12061  * return tuple([length for length in self.view.shape[:self.view.ndim]])
12062  *
12063  */
12064 
12065  /* function exit code */
12066  __pyx_L1_error:;
12067  __Pyx_XDECREF(__pyx_t_1);
12068  __Pyx_XDECREF(__pyx_t_5);
12069  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12070  __pyx_r = NULL;
12071  __pyx_L0:;
12072  __Pyx_XGIVEREF(__pyx_r);
12073  __Pyx_TraceReturn(__pyx_r, 0);
12074  __Pyx_RefNannyFinishContext();
12075  return __pyx_r;
12076 }
12077 
12078 /* "View.MemoryView":569
12079  *
12080  * @property
12081  * def strides(self): # <<<<<<<<<<<<<<
12082  * if self.view.strides == NULL:
12083  *
12084  */
12085 
12086 /* Python wrapper */
12087 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
12088 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
12089  PyObject *__pyx_r = 0;
12090  __Pyx_RefNannyDeclarations
12091  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12092  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12093 
12094  /* function exit code */
12095  __Pyx_RefNannyFinishContext();
12096  return __pyx_r;
12097 }
12098 
12099 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12100  Py_ssize_t __pyx_v_stride;
12101  PyObject *__pyx_r = NULL;
12102  __Pyx_TraceDeclarations
12103  __Pyx_RefNannyDeclarations
12104  int __pyx_t_1;
12105  PyObject *__pyx_t_2 = NULL;
12106  Py_ssize_t *__pyx_t_3;
12107  Py_ssize_t *__pyx_t_4;
12108  Py_ssize_t *__pyx_t_5;
12109  PyObject *__pyx_t_6 = NULL;
12110  int __pyx_lineno = 0;
12111  const char *__pyx_filename = NULL;
12112  int __pyx_clineno = 0;
12113  __Pyx_RefNannySetupContext("__get__", 0);
12114  __Pyx_TraceCall("__get__", __pyx_f[1], 569, 0, __PYX_ERR(1, 569, __pyx_L1_error));
12115 
12116  /* "View.MemoryView":570
12117  * @property
12118  * def strides(self):
12119  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
12120  *
12121  * raise ValueError("Buffer view does not expose strides")
12122  */
12123  __Pyx_TraceLine(570,0,__PYX_ERR(1, 570, __pyx_L1_error))
12124  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
12125  if (unlikely(__pyx_t_1)) {
12126 
12127  /* "View.MemoryView":572
12128  * if self.view.strides == NULL:
12129  *
12130  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
12131  *
12132  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
12133  */
12134  __Pyx_TraceLine(572,0,__PYX_ERR(1, 572, __pyx_L1_error))
12135  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 572, __pyx_L1_error)
12136  __Pyx_GOTREF(__pyx_t_2);
12137  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
12138  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12139  __PYX_ERR(1, 572, __pyx_L1_error)
12140 
12141  /* "View.MemoryView":570
12142  * @property
12143  * def strides(self):
12144  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
12145  *
12146  * raise ValueError("Buffer view does not expose strides")
12147  */
12148  }
12149 
12150  /* "View.MemoryView":574
12151  * raise ValueError("Buffer view does not expose strides")
12152  *
12153  * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
12154  *
12155  * @property
12156  */
12157  __Pyx_TraceLine(574,0,__PYX_ERR(1, 574, __pyx_L1_error))
12158  __Pyx_XDECREF(__pyx_r);
12159  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 574, __pyx_L1_error)
12160  __Pyx_GOTREF(__pyx_t_2);
12161  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
12162  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
12163  __pyx_t_3 = __pyx_t_5;
12164  __pyx_v_stride = (__pyx_t_3[0]);
12165  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 574, __pyx_L1_error)
12166  __Pyx_GOTREF(__pyx_t_6);
12167  if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 574, __pyx_L1_error)
12168  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12169  }
12170  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 574, __pyx_L1_error)
12171  __Pyx_GOTREF(__pyx_t_6);
12172  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12173  __pyx_r = __pyx_t_6;
12174  __pyx_t_6 = 0;
12175  goto __pyx_L0;
12176 
12177  /* "View.MemoryView":569
12178  *
12179  * @property
12180  * def strides(self): # <<<<<<<<<<<<<<
12181  * if self.view.strides == NULL:
12182  *
12183  */
12184 
12185  /* function exit code */
12186  __pyx_L1_error:;
12187  __Pyx_XDECREF(__pyx_t_2);
12188  __Pyx_XDECREF(__pyx_t_6);
12189  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12190  __pyx_r = NULL;
12191  __pyx_L0:;
12192  __Pyx_XGIVEREF(__pyx_r);
12193  __Pyx_TraceReturn(__pyx_r, 0);
12194  __Pyx_RefNannyFinishContext();
12195  return __pyx_r;
12196 }
12197 
12198 /* "View.MemoryView":577
12199  *
12200  * @property
12201  * def suboffsets(self): # <<<<<<<<<<<<<<
12202  * if self.view.suboffsets == NULL:
12203  * return (-1,) * self.view.ndim
12204  */
12205 
12206 /* Python wrapper */
12207 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
12208 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
12209  PyObject *__pyx_r = 0;
12210  __Pyx_RefNannyDeclarations
12211  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12212  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12213 
12214  /* function exit code */
12215  __Pyx_RefNannyFinishContext();
12216  return __pyx_r;
12217 }
12218 
12219 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12220  Py_ssize_t __pyx_v_suboffset;
12221  PyObject *__pyx_r = NULL;
12222  __Pyx_TraceDeclarations
12223  __Pyx_RefNannyDeclarations
12224  int __pyx_t_1;
12225  PyObject *__pyx_t_2 = NULL;
12226  PyObject *__pyx_t_3 = NULL;
12227  Py_ssize_t *__pyx_t_4;
12228  Py_ssize_t *__pyx_t_5;
12229  Py_ssize_t *__pyx_t_6;
12230  int __pyx_lineno = 0;
12231  const char *__pyx_filename = NULL;
12232  int __pyx_clineno = 0;
12233  __Pyx_RefNannySetupContext("__get__", 0);
12234  __Pyx_TraceCall("__get__", __pyx_f[1], 577, 0, __PYX_ERR(1, 577, __pyx_L1_error));
12235 
12236  /* "View.MemoryView":578
12237  * @property
12238  * def suboffsets(self):
12239  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
12240  * return (-1,) * self.view.ndim
12241  *
12242  */
12243  __Pyx_TraceLine(578,0,__PYX_ERR(1, 578, __pyx_L1_error))
12244  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
12245  if (__pyx_t_1) {
12246 
12247  /* "View.MemoryView":579
12248  * def suboffsets(self):
12249  * if self.view.suboffsets == NULL:
12250  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
12251  *
12252  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
12253  */
12254  __Pyx_TraceLine(579,0,__PYX_ERR(1, 579, __pyx_L1_error))
12255  __Pyx_XDECREF(__pyx_r);
12256  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 579, __pyx_L1_error)
12257  __Pyx_GOTREF(__pyx_t_2);
12258  __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__29, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 579, __pyx_L1_error)
12259  __Pyx_GOTREF(__pyx_t_3);
12260  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12261  __pyx_r = __pyx_t_3;
12262  __pyx_t_3 = 0;
12263  goto __pyx_L0;
12264 
12265  /* "View.MemoryView":578
12266  * @property
12267  * def suboffsets(self):
12268  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
12269  * return (-1,) * self.view.ndim
12270  *
12271  */
12272  }
12273 
12274  /* "View.MemoryView":581
12275  * return (-1,) * self.view.ndim
12276  *
12277  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
12278  *
12279  * @property
12280  */
12281  __Pyx_TraceLine(581,0,__PYX_ERR(1, 581, __pyx_L1_error))
12282  __Pyx_XDECREF(__pyx_r);
12283  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 581, __pyx_L1_error)
12284  __Pyx_GOTREF(__pyx_t_3);
12285  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
12286  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
12287  __pyx_t_4 = __pyx_t_6;
12288  __pyx_v_suboffset = (__pyx_t_4[0]);
12289  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error)
12290  __Pyx_GOTREF(__pyx_t_2);
12291  if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 581, __pyx_L1_error)
12292  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12293  }
12294  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error)
12295  __Pyx_GOTREF(__pyx_t_2);
12296  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12297  __pyx_r = __pyx_t_2;
12298  __pyx_t_2 = 0;
12299  goto __pyx_L0;
12300 
12301  /* "View.MemoryView":577
12302  *
12303  * @property
12304  * def suboffsets(self): # <<<<<<<<<<<<<<
12305  * if self.view.suboffsets == NULL:
12306  * return (-1,) * self.view.ndim
12307  */
12308 
12309  /* function exit code */
12310  __pyx_L1_error:;
12311  __Pyx_XDECREF(__pyx_t_2);
12312  __Pyx_XDECREF(__pyx_t_3);
12313  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12314  __pyx_r = NULL;
12315  __pyx_L0:;
12316  __Pyx_XGIVEREF(__pyx_r);
12317  __Pyx_TraceReturn(__pyx_r, 0);
12318  __Pyx_RefNannyFinishContext();
12319  return __pyx_r;
12320 }
12321 
12322 /* "View.MemoryView":584
12323  *
12324  * @property
12325  * def ndim(self): # <<<<<<<<<<<<<<
12326  * return self.view.ndim
12327  *
12328  */
12329 
12330 /* Python wrapper */
12331 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
12332 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
12333  PyObject *__pyx_r = 0;
12334  __Pyx_RefNannyDeclarations
12335  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12336  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12337 
12338  /* function exit code */
12339  __Pyx_RefNannyFinishContext();
12340  return __pyx_r;
12341 }
12342 
12343 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12344  PyObject *__pyx_r = NULL;
12345  __Pyx_TraceDeclarations
12346  __Pyx_RefNannyDeclarations
12347  PyObject *__pyx_t_1 = NULL;
12348  int __pyx_lineno = 0;
12349  const char *__pyx_filename = NULL;
12350  int __pyx_clineno = 0;
12351  __Pyx_RefNannySetupContext("__get__", 0);
12352  __Pyx_TraceCall("__get__", __pyx_f[1], 584, 0, __PYX_ERR(1, 584, __pyx_L1_error));
12353 
12354  /* "View.MemoryView":585
12355  * @property
12356  * def ndim(self):
12357  * return self.view.ndim # <<<<<<<<<<<<<<
12358  *
12359  * @property
12360  */
12361  __Pyx_TraceLine(585,0,__PYX_ERR(1, 585, __pyx_L1_error))
12362  __Pyx_XDECREF(__pyx_r);
12363  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 585, __pyx_L1_error)
12364  __Pyx_GOTREF(__pyx_t_1);
12365  __pyx_r = __pyx_t_1;
12366  __pyx_t_1 = 0;
12367  goto __pyx_L0;
12368 
12369  /* "View.MemoryView":584
12370  *
12371  * @property
12372  * def ndim(self): # <<<<<<<<<<<<<<
12373  * return self.view.ndim
12374  *
12375  */
12376 
12377  /* function exit code */
12378  __pyx_L1_error:;
12379  __Pyx_XDECREF(__pyx_t_1);
12380  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12381  __pyx_r = NULL;
12382  __pyx_L0:;
12383  __Pyx_XGIVEREF(__pyx_r);
12384  __Pyx_TraceReturn(__pyx_r, 0);
12385  __Pyx_RefNannyFinishContext();
12386  return __pyx_r;
12387 }
12388 
12389 /* "View.MemoryView":588
12390  *
12391  * @property
12392  * def itemsize(self): # <<<<<<<<<<<<<<
12393  * return self.view.itemsize
12394  *
12395  */
12396 
12397 /* Python wrapper */
12398 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
12399 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
12400  PyObject *__pyx_r = 0;
12401  __Pyx_RefNannyDeclarations
12402  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12403  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12404 
12405  /* function exit code */
12406  __Pyx_RefNannyFinishContext();
12407  return __pyx_r;
12408 }
12409 
12410 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12411  PyObject *__pyx_r = NULL;
12412  __Pyx_TraceDeclarations
12413  __Pyx_RefNannyDeclarations
12414  PyObject *__pyx_t_1 = NULL;
12415  int __pyx_lineno = 0;
12416  const char *__pyx_filename = NULL;
12417  int __pyx_clineno = 0;
12418  __Pyx_RefNannySetupContext("__get__", 0);
12419  __Pyx_TraceCall("__get__", __pyx_f[1], 588, 0, __PYX_ERR(1, 588, __pyx_L1_error));
12420 
12421  /* "View.MemoryView":589
12422  * @property
12423  * def itemsize(self):
12424  * return self.view.itemsize # <<<<<<<<<<<<<<
12425  *
12426  * @property
12427  */
12428  __Pyx_TraceLine(589,0,__PYX_ERR(1, 589, __pyx_L1_error))
12429  __Pyx_XDECREF(__pyx_r);
12430  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 589, __pyx_L1_error)
12431  __Pyx_GOTREF(__pyx_t_1);
12432  __pyx_r = __pyx_t_1;
12433  __pyx_t_1 = 0;
12434  goto __pyx_L0;
12435 
12436  /* "View.MemoryView":588
12437  *
12438  * @property
12439  * def itemsize(self): # <<<<<<<<<<<<<<
12440  * return self.view.itemsize
12441  *
12442  */
12443 
12444  /* function exit code */
12445  __pyx_L1_error:;
12446  __Pyx_XDECREF(__pyx_t_1);
12447  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12448  __pyx_r = NULL;
12449  __pyx_L0:;
12450  __Pyx_XGIVEREF(__pyx_r);
12451  __Pyx_TraceReturn(__pyx_r, 0);
12452  __Pyx_RefNannyFinishContext();
12453  return __pyx_r;
12454 }
12455 
12456 /* "View.MemoryView":592
12457  *
12458  * @property
12459  * def nbytes(self): # <<<<<<<<<<<<<<
12460  * return self.size * self.view.itemsize
12461  *
12462  */
12463 
12464 /* Python wrapper */
12465 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
12466 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
12467  PyObject *__pyx_r = 0;
12468  __Pyx_RefNannyDeclarations
12469  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12470  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12471 
12472  /* function exit code */
12473  __Pyx_RefNannyFinishContext();
12474  return __pyx_r;
12475 }
12476 
12477 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12478  PyObject *__pyx_r = NULL;
12479  __Pyx_TraceDeclarations
12480  __Pyx_RefNannyDeclarations
12481  PyObject *__pyx_t_1 = NULL;
12482  PyObject *__pyx_t_2 = NULL;
12483  PyObject *__pyx_t_3 = NULL;
12484  int __pyx_lineno = 0;
12485  const char *__pyx_filename = NULL;
12486  int __pyx_clineno = 0;
12487  __Pyx_RefNannySetupContext("__get__", 0);
12488  __Pyx_TraceCall("__get__", __pyx_f[1], 592, 0, __PYX_ERR(1, 592, __pyx_L1_error));
12489 
12490  /* "View.MemoryView":593
12491  * @property
12492  * def nbytes(self):
12493  * return self.size * self.view.itemsize # <<<<<<<<<<<<<<
12494  *
12495  * @property
12496  */
12497  __Pyx_TraceLine(593,0,__PYX_ERR(1, 593, __pyx_L1_error))
12498  __Pyx_XDECREF(__pyx_r);
12499  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 593, __pyx_L1_error)
12500  __Pyx_GOTREF(__pyx_t_1);
12501  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 593, __pyx_L1_error)
12502  __Pyx_GOTREF(__pyx_t_2);
12503  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 593, __pyx_L1_error)
12504  __Pyx_GOTREF(__pyx_t_3);
12505  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12506  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12507  __pyx_r = __pyx_t_3;
12508  __pyx_t_3 = 0;
12509  goto __pyx_L0;
12510 
12511  /* "View.MemoryView":592
12512  *
12513  * @property
12514  * def nbytes(self): # <<<<<<<<<<<<<<
12515  * return self.size * self.view.itemsize
12516  *
12517  */
12518 
12519  /* function exit code */
12520  __pyx_L1_error:;
12521  __Pyx_XDECREF(__pyx_t_1);
12522  __Pyx_XDECREF(__pyx_t_2);
12523  __Pyx_XDECREF(__pyx_t_3);
12524  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12525  __pyx_r = NULL;
12526  __pyx_L0:;
12527  __Pyx_XGIVEREF(__pyx_r);
12528  __Pyx_TraceReturn(__pyx_r, 0);
12529  __Pyx_RefNannyFinishContext();
12530  return __pyx_r;
12531 }
12532 
12533 /* "View.MemoryView":596
12534  *
12535  * @property
12536  * def size(self): # <<<<<<<<<<<<<<
12537  * if self._size is None:
12538  * result = 1
12539  */
12540 
12541 /* Python wrapper */
12542 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
12543 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
12544  PyObject *__pyx_r = 0;
12545  __Pyx_RefNannyDeclarations
12546  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12547  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12548 
12549  /* function exit code */
12550  __Pyx_RefNannyFinishContext();
12551  return __pyx_r;
12552 }
12553 
12554 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
12555  PyObject *__pyx_v_result = NULL;
12556  PyObject *__pyx_v_length = NULL;
12557  PyObject *__pyx_r = NULL;
12558  __Pyx_TraceDeclarations
12559  __Pyx_RefNannyDeclarations
12560  int __pyx_t_1;
12561  int __pyx_t_2;
12562  Py_ssize_t *__pyx_t_3;
12563  Py_ssize_t *__pyx_t_4;
12564  Py_ssize_t *__pyx_t_5;
12565  PyObject *__pyx_t_6 = NULL;
12566  int __pyx_lineno = 0;
12567  const char *__pyx_filename = NULL;
12568  int __pyx_clineno = 0;
12569  __Pyx_RefNannySetupContext("__get__", 0);
12570  __Pyx_TraceCall("__get__", __pyx_f[1], 596, 0, __PYX_ERR(1, 596, __pyx_L1_error));
12571 
12572  /* "View.MemoryView":597
12573  * @property
12574  * def size(self):
12575  * if self._size is None: # <<<<<<<<<<<<<<
12576  * result = 1
12577  *
12578  */
12579  __Pyx_TraceLine(597,0,__PYX_ERR(1, 597, __pyx_L1_error))
12580  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
12581  __pyx_t_2 = (__pyx_t_1 != 0);
12582  if (__pyx_t_2) {
12583 
12584  /* "View.MemoryView":598
12585  * def size(self):
12586  * if self._size is None:
12587  * result = 1 # <<<<<<<<<<<<<<
12588  *
12589  * for length in self.view.shape[:self.view.ndim]:
12590  */
12591  __Pyx_TraceLine(598,0,__PYX_ERR(1, 598, __pyx_L1_error))
12592  __Pyx_INCREF(__pyx_int_1);
12593  __pyx_v_result = __pyx_int_1;
12594 
12595  /* "View.MemoryView":600
12596  * result = 1
12597  *
12598  * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
12599  * result *= length
12600  *
12601  */
12602  __Pyx_TraceLine(600,0,__PYX_ERR(1, 600, __pyx_L1_error))
12603  __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
12604  for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
12605  __pyx_t_3 = __pyx_t_5;
12606  __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 600, __pyx_L1_error)
12607  __Pyx_GOTREF(__pyx_t_6);
12608  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
12609  __pyx_t_6 = 0;
12610 
12611  /* "View.MemoryView":601
12612  *
12613  * for length in self.view.shape[:self.view.ndim]:
12614  * result *= length # <<<<<<<<<<<<<<
12615  *
12616  * self._size = result
12617  */
12618  __Pyx_TraceLine(601,0,__PYX_ERR(1, 601, __pyx_L1_error))
12619  __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 601, __pyx_L1_error)
12620  __Pyx_GOTREF(__pyx_t_6);
12621  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
12622  __pyx_t_6 = 0;
12623  }
12624 
12625  /* "View.MemoryView":603
12626  * result *= length
12627  *
12628  * self._size = result # <<<<<<<<<<<<<<
12629  *
12630  * return self._size
12631  */
12632  __Pyx_TraceLine(603,0,__PYX_ERR(1, 603, __pyx_L1_error))
12633  __Pyx_INCREF(__pyx_v_result);
12634  __Pyx_GIVEREF(__pyx_v_result);
12635  __Pyx_GOTREF(__pyx_v_self->_size);
12636  __Pyx_DECREF(__pyx_v_self->_size);
12637  __pyx_v_self->_size = __pyx_v_result;
12638 
12639  /* "View.MemoryView":597
12640  * @property
12641  * def size(self):
12642  * if self._size is None: # <<<<<<<<<<<<<<
12643  * result = 1
12644  *
12645  */
12646  }
12647 
12648  /* "View.MemoryView":605
12649  * self._size = result
12650  *
12651  * return self._size # <<<<<<<<<<<<<<
12652  *
12653  * def __len__(self):
12654  */
12655  __Pyx_TraceLine(605,0,__PYX_ERR(1, 605, __pyx_L1_error))
12656  __Pyx_XDECREF(__pyx_r);
12657  __Pyx_INCREF(__pyx_v_self->_size);
12658  __pyx_r = __pyx_v_self->_size;
12659  goto __pyx_L0;
12660 
12661  /* "View.MemoryView":596
12662  *
12663  * @property
12664  * def size(self): # <<<<<<<<<<<<<<
12665  * if self._size is None:
12666  * result = 1
12667  */
12668 
12669  /* function exit code */
12670  __pyx_L1_error:;
12671  __Pyx_XDECREF(__pyx_t_6);
12672  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12673  __pyx_r = NULL;
12674  __pyx_L0:;
12675  __Pyx_XDECREF(__pyx_v_result);
12676  __Pyx_XDECREF(__pyx_v_length);
12677  __Pyx_XGIVEREF(__pyx_r);
12678  __Pyx_TraceReturn(__pyx_r, 0);
12679  __Pyx_RefNannyFinishContext();
12680  return __pyx_r;
12681 }
12682 
12683 /* "View.MemoryView":607
12684  * return self._size
12685  *
12686  * def __len__(self): # <<<<<<<<<<<<<<
12687  * if self.view.ndim >= 1:
12688  * return self.view.shape[0]
12689  */
12690 
12691 /* Python wrapper */
12692 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
12693 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
12694  Py_ssize_t __pyx_r;
12695  __Pyx_RefNannyDeclarations
12696  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
12697  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12698 
12699  /* function exit code */
12700  __Pyx_RefNannyFinishContext();
12701  return __pyx_r;
12702 }
12703 
12704 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
12705  Py_ssize_t __pyx_r;
12706  __Pyx_TraceDeclarations
12707  __Pyx_RefNannyDeclarations
12708  int __pyx_t_1;
12709  int __pyx_lineno = 0;
12710  const char *__pyx_filename = NULL;
12711  int __pyx_clineno = 0;
12712  __Pyx_RefNannySetupContext("__len__", 0);
12713  __Pyx_TraceCall("__len__", __pyx_f[1], 607, 0, __PYX_ERR(1, 607, __pyx_L1_error));
12714 
12715  /* "View.MemoryView":608
12716  *
12717  * def __len__(self):
12718  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
12719  * return self.view.shape[0]
12720  *
12721  */
12722  __Pyx_TraceLine(608,0,__PYX_ERR(1, 608, __pyx_L1_error))
12723  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
12724  if (__pyx_t_1) {
12725 
12726  /* "View.MemoryView":609
12727  * def __len__(self):
12728  * if self.view.ndim >= 1:
12729  * return self.view.shape[0] # <<<<<<<<<<<<<<
12730  *
12731  * return 0
12732  */
12733  __Pyx_TraceLine(609,0,__PYX_ERR(1, 609, __pyx_L1_error))
12734  __pyx_r = (__pyx_v_self->view.shape[0]);
12735  goto __pyx_L0;
12736 
12737  /* "View.MemoryView":608
12738  *
12739  * def __len__(self):
12740  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
12741  * return self.view.shape[0]
12742  *
12743  */
12744  }
12745 
12746  /* "View.MemoryView":611
12747  * return self.view.shape[0]
12748  *
12749  * return 0 # <<<<<<<<<<<<<<
12750  *
12751  * def __repr__(self):
12752  */
12753  __Pyx_TraceLine(611,0,__PYX_ERR(1, 611, __pyx_L1_error))
12754  __pyx_r = 0;
12755  goto __pyx_L0;
12756 
12757  /* "View.MemoryView":607
12758  * return self._size
12759  *
12760  * def __len__(self): # <<<<<<<<<<<<<<
12761  * if self.view.ndim >= 1:
12762  * return self.view.shape[0]
12763  */
12764 
12765  /* function exit code */
12766  __pyx_L1_error:;
12767  __Pyx_AddTraceback("View.MemoryView.memoryview.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12768  __pyx_r = -1;
12769  __pyx_L0:;
12770  __Pyx_TraceReturn(Py_None, 0);
12771  __Pyx_RefNannyFinishContext();
12772  return __pyx_r;
12773 }
12774 
12775 /* "View.MemoryView":613
12776  * return 0
12777  *
12778  * def __repr__(self): # <<<<<<<<<<<<<<
12779  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
12780  * id(self))
12781  */
12782 
12783 /* Python wrapper */
12784 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
12785 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
12786  PyObject *__pyx_r = 0;
12787  __Pyx_RefNannyDeclarations
12788  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
12789  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12790 
12791  /* function exit code */
12792  __Pyx_RefNannyFinishContext();
12793  return __pyx_r;
12794 }
12795 
12796 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
12797  PyObject *__pyx_r = NULL;
12798  __Pyx_TraceDeclarations
12799  __Pyx_RefNannyDeclarations
12800  PyObject *__pyx_t_1 = NULL;
12801  PyObject *__pyx_t_2 = NULL;
12802  PyObject *__pyx_t_3 = NULL;
12803  int __pyx_lineno = 0;
12804  const char *__pyx_filename = NULL;
12805  int __pyx_clineno = 0;
12806  __Pyx_RefNannySetupContext("__repr__", 0);
12807  __Pyx_TraceCall("__repr__", __pyx_f[1], 613, 0, __PYX_ERR(1, 613, __pyx_L1_error));
12808 
12809  /* "View.MemoryView":614
12810  *
12811  * def __repr__(self):
12812  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
12813  * id(self))
12814  *
12815  */
12816  __Pyx_TraceLine(614,0,__PYX_ERR(1, 614, __pyx_L1_error))
12817  __Pyx_XDECREF(__pyx_r);
12818  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error)
12819  __Pyx_GOTREF(__pyx_t_1);
12820  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __pyx_L1_error)
12821  __Pyx_GOTREF(__pyx_t_2);
12822  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12823  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 614, __pyx_L1_error)
12824  __Pyx_GOTREF(__pyx_t_1);
12825  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12826 
12827  /* "View.MemoryView":615
12828  * def __repr__(self):
12829  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
12830  * id(self)) # <<<<<<<<<<<<<<
12831  *
12832  * def __str__(self):
12833  */
12834  __Pyx_TraceLine(615,0,__PYX_ERR(1, 615, __pyx_L1_error))
12835  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 615, __pyx_L1_error)
12836  __Pyx_GOTREF(__pyx_t_2);
12837 
12838  /* "View.MemoryView":614
12839  *
12840  * def __repr__(self):
12841  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
12842  * id(self))
12843  *
12844  */
12845  __Pyx_TraceLine(614,0,__PYX_ERR(1, 614, __pyx_L1_error))
12846  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 614, __pyx_L1_error)
12847  __Pyx_GOTREF(__pyx_t_3);
12848  __Pyx_GIVEREF(__pyx_t_1);
12849  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
12850  __Pyx_GIVEREF(__pyx_t_2);
12851  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
12852  __pyx_t_1 = 0;
12853  __pyx_t_2 = 0;
12854  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __pyx_L1_error)
12855  __Pyx_GOTREF(__pyx_t_2);
12856  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12857  __pyx_r = __pyx_t_2;
12858  __pyx_t_2 = 0;
12859  goto __pyx_L0;
12860 
12861  /* "View.MemoryView":613
12862  * return 0
12863  *
12864  * def __repr__(self): # <<<<<<<<<<<<<<
12865  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
12866  * id(self))
12867  */
12868 
12869  /* function exit code */
12870  __pyx_L1_error:;
12871  __Pyx_XDECREF(__pyx_t_1);
12872  __Pyx_XDECREF(__pyx_t_2);
12873  __Pyx_XDECREF(__pyx_t_3);
12874  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12875  __pyx_r = NULL;
12876  __pyx_L0:;
12877  __Pyx_XGIVEREF(__pyx_r);
12878  __Pyx_TraceReturn(__pyx_r, 0);
12879  __Pyx_RefNannyFinishContext();
12880  return __pyx_r;
12881 }
12882 
12883 /* "View.MemoryView":617
12884  * id(self))
12885  *
12886  * def __str__(self): # <<<<<<<<<<<<<<
12887  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
12888  *
12889  */
12890 
12891 /* Python wrapper */
12892 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
12893 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
12894  PyObject *__pyx_r = 0;
12895  __Pyx_RefNannyDeclarations
12896  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
12897  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
12898 
12899  /* function exit code */
12900  __Pyx_RefNannyFinishContext();
12901  return __pyx_r;
12902 }
12903 
12904 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
12905  PyObject *__pyx_r = NULL;
12906  __Pyx_TraceDeclarations
12907  __Pyx_RefNannyDeclarations
12908  PyObject *__pyx_t_1 = NULL;
12909  PyObject *__pyx_t_2 = NULL;
12910  int __pyx_lineno = 0;
12911  const char *__pyx_filename = NULL;
12912  int __pyx_clineno = 0;
12913  __Pyx_RefNannySetupContext("__str__", 0);
12914  __Pyx_TraceCall("__str__", __pyx_f[1], 617, 0, __PYX_ERR(1, 617, __pyx_L1_error));
12915 
12916  /* "View.MemoryView":618
12917  *
12918  * def __str__(self):
12919  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
12920  *
12921  *
12922  */
12923  __Pyx_TraceLine(618,0,__PYX_ERR(1, 618, __pyx_L1_error))
12924  __Pyx_XDECREF(__pyx_r);
12925  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
12926  __Pyx_GOTREF(__pyx_t_1);
12927  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
12928  __Pyx_GOTREF(__pyx_t_2);
12929  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12930  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
12931  __Pyx_GOTREF(__pyx_t_1);
12932  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12933  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
12934  __Pyx_GOTREF(__pyx_t_2);
12935  __Pyx_GIVEREF(__pyx_t_1);
12936  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
12937  __pyx_t_1 = 0;
12938  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 618, __pyx_L1_error)
12939  __Pyx_GOTREF(__pyx_t_1);
12940  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12941  __pyx_r = __pyx_t_1;
12942  __pyx_t_1 = 0;
12943  goto __pyx_L0;
12944 
12945  /* "View.MemoryView":617
12946  * id(self))
12947  *
12948  * def __str__(self): # <<<<<<<<<<<<<<
12949  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
12950  *
12951  */
12952 
12953  /* function exit code */
12954  __pyx_L1_error:;
12955  __Pyx_XDECREF(__pyx_t_1);
12956  __Pyx_XDECREF(__pyx_t_2);
12957  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12958  __pyx_r = NULL;
12959  __pyx_L0:;
12960  __Pyx_XGIVEREF(__pyx_r);
12961  __Pyx_TraceReturn(__pyx_r, 0);
12962  __Pyx_RefNannyFinishContext();
12963  return __pyx_r;
12964 }
12965 
12966 /* "View.MemoryView":621
12967  *
12968  *
12969  * def is_c_contig(self): # <<<<<<<<<<<<<<
12970  * cdef __Pyx_memviewslice *mslice
12971  * cdef __Pyx_memviewslice tmp
12972  */
12973 
12974 /* Python wrapper */
12975 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12976 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_17is_c_contig = {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0};
12977 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12978  PyObject *__pyx_r = 0;
12979  __Pyx_RefNannyDeclarations
12980  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
12981  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
12982 
12983  /* function exit code */
12984  __Pyx_RefNannyFinishContext();
12985  return __pyx_r;
12986 }
12987 
12988 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
12989  __Pyx_memviewslice *__pyx_v_mslice;
12990  __Pyx_memviewslice __pyx_v_tmp;
12991  PyObject *__pyx_r = NULL;
12992  __Pyx_TraceDeclarations
12993  __Pyx_RefNannyDeclarations
12994  __Pyx_memviewslice *__pyx_t_1;
12995  PyObject *__pyx_t_2 = NULL;
12996  int __pyx_lineno = 0;
12997  const char *__pyx_filename = NULL;
12998  int __pyx_clineno = 0;
12999  __Pyx_RefNannySetupContext("is_c_contig", 0);
13000  __Pyx_TraceCall("is_c_contig", __pyx_f[1], 621, 0, __PYX_ERR(1, 621, __pyx_L1_error));
13001 
13002  /* "View.MemoryView":624
13003  * cdef __Pyx_memviewslice *mslice
13004  * cdef __Pyx_memviewslice tmp
13005  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
13006  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
13007  *
13008  */
13009  __Pyx_TraceLine(624,0,__PYX_ERR(1, 624, __pyx_L1_error))
13010  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 624, __pyx_L1_error)
13011  __pyx_v_mslice = __pyx_t_1;
13012 
13013  /* "View.MemoryView":625
13014  * cdef __Pyx_memviewslice tmp
13015  * mslice = get_slice_from_memview(self, &tmp)
13016  * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
13017  *
13018  * def is_f_contig(self):
13019  */
13020  __Pyx_TraceLine(625,0,__PYX_ERR(1, 625, __pyx_L1_error))
13021  __Pyx_XDECREF(__pyx_r);
13022  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 625, __pyx_L1_error)
13023  __Pyx_GOTREF(__pyx_t_2);
13024  __pyx_r = __pyx_t_2;
13025  __pyx_t_2 = 0;
13026  goto __pyx_L0;
13027 
13028  /* "View.MemoryView":621
13029  *
13030  *
13031  * def is_c_contig(self): # <<<<<<<<<<<<<<
13032  * cdef __Pyx_memviewslice *mslice
13033  * cdef __Pyx_memviewslice tmp
13034  */
13035 
13036  /* function exit code */
13037  __pyx_L1_error:;
13038  __Pyx_XDECREF(__pyx_t_2);
13039  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
13040  __pyx_r = NULL;
13041  __pyx_L0:;
13042  __Pyx_XGIVEREF(__pyx_r);
13043  __Pyx_TraceReturn(__pyx_r, 0);
13044  __Pyx_RefNannyFinishContext();
13045  return __pyx_r;
13046 }
13047 
13048 /* "View.MemoryView":627
13049  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
13050  *
13051  * def is_f_contig(self): # <<<<<<<<<<<<<<
13052  * cdef __Pyx_memviewslice *mslice
13053  * cdef __Pyx_memviewslice tmp
13054  */
13055 
13056 /* Python wrapper */
13057 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13058 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_19is_f_contig = {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0};
13059 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13060  PyObject *__pyx_r = 0;
13061  __Pyx_RefNannyDeclarations
13062  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
13063  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
13064 
13065  /* function exit code */
13066  __Pyx_RefNannyFinishContext();
13067  return __pyx_r;
13068 }
13069 
13070 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
13071  __Pyx_memviewslice *__pyx_v_mslice;
13072  __Pyx_memviewslice __pyx_v_tmp;
13073  PyObject *__pyx_r = NULL;
13074  __Pyx_TraceDeclarations
13075  __Pyx_RefNannyDeclarations
13076  __Pyx_memviewslice *__pyx_t_1;
13077  PyObject *__pyx_t_2 = NULL;
13078  int __pyx_lineno = 0;
13079  const char *__pyx_filename = NULL;
13080  int __pyx_clineno = 0;
13081  __Pyx_RefNannySetupContext("is_f_contig", 0);
13082  __Pyx_TraceCall("is_f_contig", __pyx_f[1], 627, 0, __PYX_ERR(1, 627, __pyx_L1_error));
13083 
13084  /* "View.MemoryView":630
13085  * cdef __Pyx_memviewslice *mslice
13086  * cdef __Pyx_memviewslice tmp
13087  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
13088  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
13089  *
13090  */
13091  __Pyx_TraceLine(630,0,__PYX_ERR(1, 630, __pyx_L1_error))
13092  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 630, __pyx_L1_error)
13093  __pyx_v_mslice = __pyx_t_1;
13094 
13095  /* "View.MemoryView":631
13096  * cdef __Pyx_memviewslice tmp
13097  * mslice = get_slice_from_memview(self, &tmp)
13098  * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
13099  *
13100  * def copy(self):
13101  */
13102  __Pyx_TraceLine(631,0,__PYX_ERR(1, 631, __pyx_L1_error))
13103  __Pyx_XDECREF(__pyx_r);
13104  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 631, __pyx_L1_error)
13105  __Pyx_GOTREF(__pyx_t_2);
13106  __pyx_r = __pyx_t_2;
13107  __pyx_t_2 = 0;
13108  goto __pyx_L0;
13109 
13110  /* "View.MemoryView":627
13111  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
13112  *
13113  * def is_f_contig(self): # <<<<<<<<<<<<<<
13114  * cdef __Pyx_memviewslice *mslice
13115  * cdef __Pyx_memviewslice tmp
13116  */
13117 
13118  /* function exit code */
13119  __pyx_L1_error:;
13120  __Pyx_XDECREF(__pyx_t_2);
13121  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
13122  __pyx_r = NULL;
13123  __pyx_L0:;
13124  __Pyx_XGIVEREF(__pyx_r);
13125  __Pyx_TraceReturn(__pyx_r, 0);
13126  __Pyx_RefNannyFinishContext();
13127  return __pyx_r;
13128 }
13129 
13130 /* "View.MemoryView":633
13131  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
13132  *
13133  * def copy(self): # <<<<<<<<<<<<<<
13134  * cdef __Pyx_memviewslice mslice
13135  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
13136  */
13137 
13138 /* Python wrapper */
13139 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13140 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_21copy = {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0};
13141 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13142  PyObject *__pyx_r = 0;
13143  __Pyx_RefNannyDeclarations
13144  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
13145  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
13146 
13147  /* function exit code */
13148  __Pyx_RefNannyFinishContext();
13149  return __pyx_r;
13150 }
13151 
13152 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
13153  __Pyx_memviewslice __pyx_v_mslice;
13154  int __pyx_v_flags;
13155  PyObject *__pyx_r = NULL;
13156  __Pyx_TraceDeclarations
13157  __Pyx_RefNannyDeclarations
13158  __Pyx_memviewslice __pyx_t_1;
13159  PyObject *__pyx_t_2 = NULL;
13160  int __pyx_lineno = 0;
13161  const char *__pyx_filename = NULL;
13162  int __pyx_clineno = 0;
13163  __Pyx_RefNannySetupContext("copy", 0);
13164  __Pyx_TraceCall("copy", __pyx_f[1], 633, 0, __PYX_ERR(1, 633, __pyx_L1_error));
13165 
13166  /* "View.MemoryView":635
13167  * def copy(self):
13168  * cdef __Pyx_memviewslice mslice
13169  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
13170  *
13171  * slice_copy(self, &mslice)
13172  */
13173  __Pyx_TraceLine(635,0,__PYX_ERR(1, 635, __pyx_L1_error))
13174  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
13175 
13176  /* "View.MemoryView":637
13177  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
13178  *
13179  * slice_copy(self, &mslice) # <<<<<<<<<<<<<<
13180  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
13181  * self.view.itemsize,
13182  */
13183  __Pyx_TraceLine(637,0,__PYX_ERR(1, 637, __pyx_L1_error))
13184  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
13185 
13186  /* "View.MemoryView":638
13187  *
13188  * slice_copy(self, &mslice)
13189  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
13190  * self.view.itemsize,
13191  * flags|PyBUF_C_CONTIGUOUS,
13192  */
13193  __Pyx_TraceLine(638,0,__PYX_ERR(1, 638, __pyx_L1_error))
13194  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 638, __pyx_L1_error)
13195  __pyx_v_mslice = __pyx_t_1;
13196 
13197  /* "View.MemoryView":643
13198  * self.dtype_is_object)
13199  *
13200  * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
13201  *
13202  * def copy_fortran(self):
13203  */
13204  __Pyx_TraceLine(643,0,__PYX_ERR(1, 643, __pyx_L1_error))
13205  __Pyx_XDECREF(__pyx_r);
13206  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 643, __pyx_L1_error)
13207  __Pyx_GOTREF(__pyx_t_2);
13208  __pyx_r = __pyx_t_2;
13209  __pyx_t_2 = 0;
13210  goto __pyx_L0;
13211 
13212  /* "View.MemoryView":633
13213  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
13214  *
13215  * def copy(self): # <<<<<<<<<<<<<<
13216  * cdef __Pyx_memviewslice mslice
13217  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
13218  */
13219 
13220  /* function exit code */
13221  __pyx_L1_error:;
13222  __Pyx_XDECREF(__pyx_t_2);
13223  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
13224  __pyx_r = NULL;
13225  __pyx_L0:;
13226  __Pyx_XGIVEREF(__pyx_r);
13227  __Pyx_TraceReturn(__pyx_r, 0);
13228  __Pyx_RefNannyFinishContext();
13229  return __pyx_r;
13230 }
13231 
13232 /* "View.MemoryView":645
13233  * return memoryview_copy_from_slice(self, &mslice)
13234  *
13235  * def copy_fortran(self): # <<<<<<<<<<<<<<
13236  * cdef __Pyx_memviewslice src, dst
13237  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
13238  */
13239 
13240 /* Python wrapper */
13241 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13242 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_23copy_fortran = {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0};
13243 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13244  PyObject *__pyx_r = 0;
13245  __Pyx_RefNannyDeclarations
13246  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
13247  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
13248 
13249  /* function exit code */
13250  __Pyx_RefNannyFinishContext();
13251  return __pyx_r;
13252 }
13253 
13254 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
13255  __Pyx_memviewslice __pyx_v_src;
13256  __Pyx_memviewslice __pyx_v_dst;
13257  int __pyx_v_flags;
13258  PyObject *__pyx_r = NULL;
13259  __Pyx_TraceDeclarations
13260  __Pyx_RefNannyDeclarations
13261  __Pyx_memviewslice __pyx_t_1;
13262  PyObject *__pyx_t_2 = NULL;
13263  int __pyx_lineno = 0;
13264  const char *__pyx_filename = NULL;
13265  int __pyx_clineno = 0;
13266  __Pyx_RefNannySetupContext("copy_fortran", 0);
13267  __Pyx_TraceCall("copy_fortran", __pyx_f[1], 645, 0, __PYX_ERR(1, 645, __pyx_L1_error));
13268 
13269  /* "View.MemoryView":647
13270  * def copy_fortran(self):
13271  * cdef __Pyx_memviewslice src, dst
13272  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
13273  *
13274  * slice_copy(self, &src)
13275  */
13276  __Pyx_TraceLine(647,0,__PYX_ERR(1, 647, __pyx_L1_error))
13277  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
13278 
13279  /* "View.MemoryView":649
13280  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
13281  *
13282  * slice_copy(self, &src) # <<<<<<<<<<<<<<
13283  * dst = slice_copy_contig(&src, "fortran", self.view.ndim,
13284  * self.view.itemsize,
13285  */
13286  __Pyx_TraceLine(649,0,__PYX_ERR(1, 649, __pyx_L1_error))
13287  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
13288 
13289  /* "View.MemoryView":650
13290  *
13291  * slice_copy(self, &src)
13292  * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
13293  * self.view.itemsize,
13294  * flags|PyBUF_F_CONTIGUOUS,
13295  */
13296  __Pyx_TraceLine(650,0,__PYX_ERR(1, 650, __pyx_L1_error))
13297  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 650, __pyx_L1_error)
13298  __pyx_v_dst = __pyx_t_1;
13299 
13300  /* "View.MemoryView":655
13301  * self.dtype_is_object)
13302  *
13303  * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
13304  *
13305  *
13306  */
13307  __Pyx_TraceLine(655,0,__PYX_ERR(1, 655, __pyx_L1_error))
13308  __Pyx_XDECREF(__pyx_r);
13309  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 655, __pyx_L1_error)
13310  __Pyx_GOTREF(__pyx_t_2);
13311  __pyx_r = __pyx_t_2;
13312  __pyx_t_2 = 0;
13313  goto __pyx_L0;
13314 
13315  /* "View.MemoryView":645
13316  * return memoryview_copy_from_slice(self, &mslice)
13317  *
13318  * def copy_fortran(self): # <<<<<<<<<<<<<<
13319  * cdef __Pyx_memviewslice src, dst
13320  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
13321  */
13322 
13323  /* function exit code */
13324  __pyx_L1_error:;
13325  __Pyx_XDECREF(__pyx_t_2);
13326  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
13327  __pyx_r = NULL;
13328  __pyx_L0:;
13329  __Pyx_XGIVEREF(__pyx_r);
13330  __Pyx_TraceReturn(__pyx_r, 0);
13331  __Pyx_RefNannyFinishContext();
13332  return __pyx_r;
13333 }
13334 
13335 /* "(tree fragment)":1
13336  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
13337  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13338  * def __setstate_cython__(self, __pyx_state):
13339  */
13340 
13341 /* Python wrapper */
13342 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13343 static PyMethodDef __pyx_mdef___pyx_memoryview_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0};
13344 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13345  PyObject *__pyx_r = 0;
13346  __Pyx_RefNannyDeclarations
13347  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
13348  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
13349 
13350  /* function exit code */
13351  __Pyx_RefNannyFinishContext();
13352  return __pyx_r;
13353 }
13354 
13355 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
13356  PyObject *__pyx_r = NULL;
13357  __Pyx_TraceDeclarations
13358  __Pyx_RefNannyDeclarations
13359  PyObject *__pyx_t_1 = NULL;
13360  int __pyx_lineno = 0;
13361  const char *__pyx_filename = NULL;
13362  int __pyx_clineno = 0;
13363  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
13364  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
13365 
13366  /* "(tree fragment)":2
13367  * def __reduce_cython__(self):
13368  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
13369  * def __setstate_cython__(self, __pyx_state):
13370  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13371  */
13372  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
13373  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
13374  __Pyx_GOTREF(__pyx_t_1);
13375  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
13376  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13377  __PYX_ERR(1, 2, __pyx_L1_error)
13378 
13379  /* "(tree fragment)":1
13380  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
13381  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13382  * def __setstate_cython__(self, __pyx_state):
13383  */
13384 
13385  /* function exit code */
13386  __pyx_L1_error:;
13387  __Pyx_XDECREF(__pyx_t_1);
13388  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13389  __pyx_r = NULL;
13390  __Pyx_XGIVEREF(__pyx_r);
13391  __Pyx_TraceReturn(__pyx_r, 0);
13392  __Pyx_RefNannyFinishContext();
13393  return __pyx_r;
13394 }
13395 
13396 /* "(tree fragment)":3
13397  * def __reduce_cython__(self):
13398  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13399  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
13400  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13401  */
13402 
13403 /* Python wrapper */
13404 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
13405 static PyMethodDef __pyx_mdef___pyx_memoryview_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0};
13406 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
13407  PyObject *__pyx_r = 0;
13408  __Pyx_RefNannyDeclarations
13409  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
13410  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
13411 
13412  /* function exit code */
13413  __Pyx_RefNannyFinishContext();
13414  return __pyx_r;
13415 }
13416 
13417 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
13418  PyObject *__pyx_r = NULL;
13419  __Pyx_TraceDeclarations
13420  __Pyx_RefNannyDeclarations
13421  PyObject *__pyx_t_1 = NULL;
13422  int __pyx_lineno = 0;
13423  const char *__pyx_filename = NULL;
13424  int __pyx_clineno = 0;
13425  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
13426  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
13427 
13428  /* "(tree fragment)":4
13429  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13430  * def __setstate_cython__(self, __pyx_state):
13431  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
13432  */
13433  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
13434  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
13435  __Pyx_GOTREF(__pyx_t_1);
13436  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
13437  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13438  __PYX_ERR(1, 4, __pyx_L1_error)
13439 
13440  /* "(tree fragment)":3
13441  * def __reduce_cython__(self):
13442  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13443  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
13444  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
13445  */
13446 
13447  /* function exit code */
13448  __pyx_L1_error:;
13449  __Pyx_XDECREF(__pyx_t_1);
13450  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13451  __pyx_r = NULL;
13452  __Pyx_XGIVEREF(__pyx_r);
13453  __Pyx_TraceReturn(__pyx_r, 0);
13454  __Pyx_RefNannyFinishContext();
13455  return __pyx_r;
13456 }
13457 
13458 /* "View.MemoryView":659
13459  *
13460  * @cname('__pyx_memoryview_new')
13461  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
13462  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13463  * result.typeinfo = typeinfo
13464  */
13465 
13466 static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
13467  struct __pyx_memoryview_obj *__pyx_v_result = 0;
13468  PyObject *__pyx_r = NULL;
13469  __Pyx_TraceDeclarations
13470  __Pyx_RefNannyDeclarations
13471  PyObject *__pyx_t_1 = NULL;
13472  PyObject *__pyx_t_2 = NULL;
13473  PyObject *__pyx_t_3 = NULL;
13474  int __pyx_lineno = 0;
13475  const char *__pyx_filename = NULL;
13476  int __pyx_clineno = 0;
13477  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
13478  __Pyx_TraceCall("memoryview_cwrapper", __pyx_f[1], 659, 0, __PYX_ERR(1, 659, __pyx_L1_error));
13479 
13480  /* "View.MemoryView":660
13481  * @cname('__pyx_memoryview_new')
13482  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
13483  * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
13484  * result.typeinfo = typeinfo
13485  * return result
13486  */
13487  __Pyx_TraceLine(660,0,__PYX_ERR(1, 660, __pyx_L1_error))
13488  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 660, __pyx_L1_error)
13489  __Pyx_GOTREF(__pyx_t_1);
13490  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 660, __pyx_L1_error)
13491  __Pyx_GOTREF(__pyx_t_2);
13492  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 660, __pyx_L1_error)
13493  __Pyx_GOTREF(__pyx_t_3);
13494  __Pyx_INCREF(__pyx_v_o);
13495  __Pyx_GIVEREF(__pyx_v_o);
13496  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
13497  __Pyx_GIVEREF(__pyx_t_1);
13498  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
13499  __Pyx_GIVEREF(__pyx_t_2);
13500  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
13501  __pyx_t_1 = 0;
13502  __pyx_t_2 = 0;
13503  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 660, __pyx_L1_error)
13504  __Pyx_GOTREF(__pyx_t_2);
13505  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13506  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
13507  __pyx_t_2 = 0;
13508 
13509  /* "View.MemoryView":661
13510  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
13511  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13512  * result.typeinfo = typeinfo # <<<<<<<<<<<<<<
13513  * return result
13514  *
13515  */
13516  __Pyx_TraceLine(661,0,__PYX_ERR(1, 661, __pyx_L1_error))
13517  __pyx_v_result->typeinfo = __pyx_v_typeinfo;
13518 
13519  /* "View.MemoryView":662
13520  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13521  * result.typeinfo = typeinfo
13522  * return result # <<<<<<<<<<<<<<
13523  *
13524  * @cname('__pyx_memoryview_check')
13525  */
13526  __Pyx_TraceLine(662,0,__PYX_ERR(1, 662, __pyx_L1_error))
13527  __Pyx_XDECREF(__pyx_r);
13528  __Pyx_INCREF(((PyObject *)__pyx_v_result));
13529  __pyx_r = ((PyObject *)__pyx_v_result);
13530  goto __pyx_L0;
13531 
13532  /* "View.MemoryView":659
13533  *
13534  * @cname('__pyx_memoryview_new')
13535  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
13536  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
13537  * result.typeinfo = typeinfo
13538  */
13539 
13540  /* function exit code */
13541  __pyx_L1_error:;
13542  __Pyx_XDECREF(__pyx_t_1);
13543  __Pyx_XDECREF(__pyx_t_2);
13544  __Pyx_XDECREF(__pyx_t_3);
13545  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
13546  __pyx_r = 0;
13547  __pyx_L0:;
13548  __Pyx_XDECREF((PyObject *)__pyx_v_result);
13549  __Pyx_XGIVEREF(__pyx_r);
13550  __Pyx_TraceReturn(__pyx_r, 0);
13551  __Pyx_RefNannyFinishContext();
13552  return __pyx_r;
13553 }
13554 
13555 /* "View.MemoryView":665
13556  *
13557  * @cname('__pyx_memoryview_check')
13558  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
13559  * return isinstance(o, memoryview)
13560  *
13561  */
13562 
13563 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
13564  int __pyx_r;
13565  __Pyx_TraceDeclarations
13566  __Pyx_RefNannyDeclarations
13567  int __pyx_t_1;
13568  int __pyx_lineno = 0;
13569  const char *__pyx_filename = NULL;
13570  int __pyx_clineno = 0;
13571  __Pyx_RefNannySetupContext("memoryview_check", 0);
13572  __Pyx_TraceCall("memoryview_check", __pyx_f[1], 665, 0, __PYX_ERR(1, 665, __pyx_L1_error));
13573 
13574  /* "View.MemoryView":666
13575  * @cname('__pyx_memoryview_check')
13576  * cdef inline bint memoryview_check(object o):
13577  * return isinstance(o, memoryview) # <<<<<<<<<<<<<<
13578  *
13579  * cdef tuple _unellipsify(object index, int ndim):
13580  */
13581  __Pyx_TraceLine(666,0,__PYX_ERR(1, 666, __pyx_L1_error))
13582  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
13583  __pyx_r = __pyx_t_1;
13584  goto __pyx_L0;
13585 
13586  /* "View.MemoryView":665
13587  *
13588  * @cname('__pyx_memoryview_check')
13589  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
13590  * return isinstance(o, memoryview)
13591  *
13592  */
13593 
13594  /* function exit code */
13595  __pyx_L1_error:;
13596  __Pyx_WriteUnraisable("View.MemoryView.memoryview_check", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
13597  __pyx_r = 0;
13598  __pyx_L0:;
13599  __Pyx_TraceReturn(Py_None, 0);
13600  __Pyx_RefNannyFinishContext();
13601  return __pyx_r;
13602 }
13603 
13604 /* "View.MemoryView":668
13605  * return isinstance(o, memoryview)
13606  *
13607  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
13608  * """
13609  * Replace all ellipses with full slices and fill incomplete indices with
13610  */
13611 
13612 static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
13613  PyObject *__pyx_v_tup = NULL;
13614  PyObject *__pyx_v_result = NULL;
13615  int __pyx_v_have_slices;
13616  int __pyx_v_seen_ellipsis;
13617  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
13618  PyObject *__pyx_v_item = NULL;
13619  Py_ssize_t __pyx_v_nslices;
13620  PyObject *__pyx_r = NULL;
13621  __Pyx_TraceDeclarations
13622  __Pyx_RefNannyDeclarations
13623  int __pyx_t_1;
13624  int __pyx_t_2;
13625  PyObject *__pyx_t_3 = NULL;
13626  PyObject *__pyx_t_4 = NULL;
13627  Py_ssize_t __pyx_t_5;
13628  PyObject *(*__pyx_t_6)(PyObject *);
13629  PyObject *__pyx_t_7 = NULL;
13630  Py_ssize_t __pyx_t_8;
13631  int __pyx_t_9;
13632  int __pyx_t_10;
13633  PyObject *__pyx_t_11 = NULL;
13634  int __pyx_lineno = 0;
13635  const char *__pyx_filename = NULL;
13636  int __pyx_clineno = 0;
13637  __Pyx_RefNannySetupContext("_unellipsify", 0);
13638  __Pyx_TraceCall("_unellipsify", __pyx_f[1], 668, 0, __PYX_ERR(1, 668, __pyx_L1_error));
13639 
13640  /* "View.MemoryView":673
13641  * full slices.
13642  * """
13643  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
13644  * tup = (index,)
13645  * else:
13646  */
13647  __Pyx_TraceLine(673,0,__PYX_ERR(1, 673, __pyx_L1_error))
13648  __pyx_t_1 = PyTuple_Check(__pyx_v_index);
13649  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
13650  if (__pyx_t_2) {
13651 
13652  /* "View.MemoryView":674
13653  * """
13654  * if not isinstance(index, tuple):
13655  * tup = (index,) # <<<<<<<<<<<<<<
13656  * else:
13657  * tup = index
13658  */
13659  __Pyx_TraceLine(674,0,__PYX_ERR(1, 674, __pyx_L1_error))
13660  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 674, __pyx_L1_error)
13661  __Pyx_GOTREF(__pyx_t_3);
13662  __Pyx_INCREF(__pyx_v_index);
13663  __Pyx_GIVEREF(__pyx_v_index);
13664  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
13665  __pyx_v_tup = __pyx_t_3;
13666  __pyx_t_3 = 0;
13667 
13668  /* "View.MemoryView":673
13669  * full slices.
13670  * """
13671  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
13672  * tup = (index,)
13673  * else:
13674  */
13675  goto __pyx_L3;
13676  }
13677 
13678  /* "View.MemoryView":676
13679  * tup = (index,)
13680  * else:
13681  * tup = index # <<<<<<<<<<<<<<
13682  *
13683  * result = []
13684  */
13685  __Pyx_TraceLine(676,0,__PYX_ERR(1, 676, __pyx_L1_error))
13686  /*else*/ {
13687  __Pyx_INCREF(__pyx_v_index);
13688  __pyx_v_tup = __pyx_v_index;
13689  }
13690  __pyx_L3:;
13691 
13692  /* "View.MemoryView":678
13693  * tup = index
13694  *
13695  * result = [] # <<<<<<<<<<<<<<
13696  * have_slices = False
13697  * seen_ellipsis = False
13698  */
13699  __Pyx_TraceLine(678,0,__PYX_ERR(1, 678, __pyx_L1_error))
13700  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 678, __pyx_L1_error)
13701  __Pyx_GOTREF(__pyx_t_3);
13702  __pyx_v_result = ((PyObject*)__pyx_t_3);
13703  __pyx_t_3 = 0;
13704 
13705  /* "View.MemoryView":679
13706  *
13707  * result = []
13708  * have_slices = False # <<<<<<<<<<<<<<
13709  * seen_ellipsis = False
13710  * for idx, item in enumerate(tup):
13711  */
13712  __Pyx_TraceLine(679,0,__PYX_ERR(1, 679, __pyx_L1_error))
13713  __pyx_v_have_slices = 0;
13714 
13715  /* "View.MemoryView":680
13716  * result = []
13717  * have_slices = False
13718  * seen_ellipsis = False # <<<<<<<<<<<<<<
13719  * for idx, item in enumerate(tup):
13720  * if item is Ellipsis:
13721  */
13722  __Pyx_TraceLine(680,0,__PYX_ERR(1, 680, __pyx_L1_error))
13723  __pyx_v_seen_ellipsis = 0;
13724 
13725  /* "View.MemoryView":681
13726  * have_slices = False
13727  * seen_ellipsis = False
13728  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
13729  * if item is Ellipsis:
13730  * if not seen_ellipsis:
13731  */
13732  __Pyx_TraceLine(681,0,__PYX_ERR(1, 681, __pyx_L1_error))
13733  __Pyx_INCREF(__pyx_int_0);
13734  __pyx_t_3 = __pyx_int_0;
13735  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
13736  __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
13737  __pyx_t_6 = NULL;
13738  } else {
13739  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 681, __pyx_L1_error)
13740  __Pyx_GOTREF(__pyx_t_4);
13741  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 681, __pyx_L1_error)
13742  }
13743  for (;;) {
13744  if (likely(!__pyx_t_6)) {
13745  if (likely(PyList_CheckExact(__pyx_t_4))) {
13746  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
13747  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13748  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 681, __pyx_L1_error)
13749  #else
13750  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error)
13751  __Pyx_GOTREF(__pyx_t_7);
13752  #endif
13753  } else {
13754  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
13755  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
13756  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 681, __pyx_L1_error)
13757  #else
13758  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error)
13759  __Pyx_GOTREF(__pyx_t_7);
13760  #endif
13761  }
13762  } else {
13763  __pyx_t_7 = __pyx_t_6(__pyx_t_4);
13764  if (unlikely(!__pyx_t_7)) {
13765  PyObject* exc_type = PyErr_Occurred();
13766  if (exc_type) {
13767  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
13768  else __PYX_ERR(1, 681, __pyx_L1_error)
13769  }
13770  break;
13771  }
13772  __Pyx_GOTREF(__pyx_t_7);
13773  }
13774  __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
13775  __pyx_t_7 = 0;
13776  __Pyx_INCREF(__pyx_t_3);
13777  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
13778  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 681, __pyx_L1_error)
13779  __Pyx_GOTREF(__pyx_t_7);
13780  __Pyx_DECREF(__pyx_t_3);
13781  __pyx_t_3 = __pyx_t_7;
13782  __pyx_t_7 = 0;
13783 
13784  /* "View.MemoryView":682
13785  * seen_ellipsis = False
13786  * for idx, item in enumerate(tup):
13787  * if item is Ellipsis: # <<<<<<<<<<<<<<
13788  * if not seen_ellipsis:
13789  * result.extend([slice(None)] * (ndim - len(tup) + 1))
13790  */
13791  __Pyx_TraceLine(682,0,__PYX_ERR(1, 682, __pyx_L1_error))
13792  __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
13793  __pyx_t_1 = (__pyx_t_2 != 0);
13794  if (__pyx_t_1) {
13795 
13796  /* "View.MemoryView":683
13797  * for idx, item in enumerate(tup):
13798  * if item is Ellipsis:
13799  * if not seen_ellipsis: # <<<<<<<<<<<<<<
13800  * result.extend([slice(None)] * (ndim - len(tup) + 1))
13801  * seen_ellipsis = True
13802  */
13803  __Pyx_TraceLine(683,0,__PYX_ERR(1, 683, __pyx_L1_error))
13804  __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
13805  if (__pyx_t_1) {
13806 
13807  /* "View.MemoryView":684
13808  * if item is Ellipsis:
13809  * if not seen_ellipsis:
13810  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
13811  * seen_ellipsis = True
13812  * else:
13813  */
13814  __Pyx_TraceLine(684,0,__PYX_ERR(1, 684, __pyx_L1_error))
13815  __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 684, __pyx_L1_error)
13816  __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 684, __pyx_L1_error)
13817  __Pyx_GOTREF(__pyx_t_7);
13818  { Py_ssize_t __pyx_temp;
13819  for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
13820  __Pyx_INCREF(__pyx_slice__32);
13821  __Pyx_GIVEREF(__pyx_slice__32);
13822  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__32);
13823  }
13824  }
13825  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 684, __pyx_L1_error)
13826  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13827 
13828  /* "View.MemoryView":685
13829  * if not seen_ellipsis:
13830  * result.extend([slice(None)] * (ndim - len(tup) + 1))
13831  * seen_ellipsis = True # <<<<<<<<<<<<<<
13832  * else:
13833  * result.append(slice(None))
13834  */
13835  __Pyx_TraceLine(685,0,__PYX_ERR(1, 685, __pyx_L1_error))
13836  __pyx_v_seen_ellipsis = 1;
13837 
13838  /* "View.MemoryView":683
13839  * for idx, item in enumerate(tup):
13840  * if item is Ellipsis:
13841  * if not seen_ellipsis: # <<<<<<<<<<<<<<
13842  * result.extend([slice(None)] * (ndim - len(tup) + 1))
13843  * seen_ellipsis = True
13844  */
13845  goto __pyx_L7;
13846  }
13847 
13848  /* "View.MemoryView":687
13849  * seen_ellipsis = True
13850  * else:
13851  * result.append(slice(None)) # <<<<<<<<<<<<<<
13852  * have_slices = True
13853  * else:
13854  */
13855  __Pyx_TraceLine(687,0,__PYX_ERR(1, 687, __pyx_L1_error))
13856  /*else*/ {
13857  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__32); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 687, __pyx_L1_error)
13858  }
13859  __pyx_L7:;
13860 
13861  /* "View.MemoryView":688
13862  * else:
13863  * result.append(slice(None))
13864  * have_slices = True # <<<<<<<<<<<<<<
13865  * else:
13866  * if not isinstance(item, slice) and not PyIndex_Check(item):
13867  */
13868  __Pyx_TraceLine(688,0,__PYX_ERR(1, 688, __pyx_L1_error))
13869  __pyx_v_have_slices = 1;
13870 
13871  /* "View.MemoryView":682
13872  * seen_ellipsis = False
13873  * for idx, item in enumerate(tup):
13874  * if item is Ellipsis: # <<<<<<<<<<<<<<
13875  * if not seen_ellipsis:
13876  * result.extend([slice(None)] * (ndim - len(tup) + 1))
13877  */
13878  goto __pyx_L6;
13879  }
13880 
13881  /* "View.MemoryView":690
13882  * have_slices = True
13883  * else:
13884  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
13885  * raise TypeError("Cannot index with type '%s'" % type(item))
13886  *
13887  */
13888  __Pyx_TraceLine(690,0,__PYX_ERR(1, 690, __pyx_L1_error))
13889  /*else*/ {
13890  __pyx_t_2 = PySlice_Check(__pyx_v_item);
13891  __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
13892  if (__pyx_t_10) {
13893  } else {
13894  __pyx_t_1 = __pyx_t_10;
13895  goto __pyx_L9_bool_binop_done;
13896  }
13897  __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
13898  __pyx_t_1 = __pyx_t_10;
13899  __pyx_L9_bool_binop_done:;
13900  if (unlikely(__pyx_t_1)) {
13901 
13902  /* "View.MemoryView":691
13903  * else:
13904  * if not isinstance(item, slice) and not PyIndex_Check(item):
13905  * raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<<
13906  *
13907  * have_slices = have_slices or isinstance(item, slice)
13908  */
13909  __Pyx_TraceLine(691,0,__PYX_ERR(1, 691, __pyx_L1_error))
13910  __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 691, __pyx_L1_error)
13911  __Pyx_GOTREF(__pyx_t_7);
13912  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 691, __pyx_L1_error)
13913  __Pyx_GOTREF(__pyx_t_11);
13914  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13915  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
13916  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13917  __PYX_ERR(1, 691, __pyx_L1_error)
13918 
13919  /* "View.MemoryView":690
13920  * have_slices = True
13921  * else:
13922  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
13923  * raise TypeError("Cannot index with type '%s'" % type(item))
13924  *
13925  */
13926  }
13927 
13928  /* "View.MemoryView":693
13929  * raise TypeError("Cannot index with type '%s'" % type(item))
13930  *
13931  * have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<<
13932  * result.append(item)
13933  *
13934  */
13935  __Pyx_TraceLine(693,0,__PYX_ERR(1, 693, __pyx_L1_error))
13936  __pyx_t_10 = (__pyx_v_have_slices != 0);
13937  if (!__pyx_t_10) {
13938  } else {
13939  __pyx_t_1 = __pyx_t_10;
13940  goto __pyx_L11_bool_binop_done;
13941  }
13942  __pyx_t_10 = PySlice_Check(__pyx_v_item);
13943  __pyx_t_2 = (__pyx_t_10 != 0);
13944  __pyx_t_1 = __pyx_t_2;
13945  __pyx_L11_bool_binop_done:;
13946  __pyx_v_have_slices = __pyx_t_1;
13947 
13948  /* "View.MemoryView":694
13949  *
13950  * have_slices = have_slices or isinstance(item, slice)
13951  * result.append(item) # <<<<<<<<<<<<<<
13952  *
13953  * nslices = ndim - len(result)
13954  */
13955  __Pyx_TraceLine(694,0,__PYX_ERR(1, 694, __pyx_L1_error))
13956  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 694, __pyx_L1_error)
13957  }
13958  __pyx_L6:;
13959 
13960  /* "View.MemoryView":681
13961  * have_slices = False
13962  * seen_ellipsis = False
13963  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
13964  * if item is Ellipsis:
13965  * if not seen_ellipsis:
13966  */
13967  __Pyx_TraceLine(681,0,__PYX_ERR(1, 681, __pyx_L1_error))
13968  }
13969  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13970  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13971 
13972  /* "View.MemoryView":696
13973  * result.append(item)
13974  *
13975  * nslices = ndim - len(result) # <<<<<<<<<<<<<<
13976  * if nslices:
13977  * result.extend([slice(None)] * nslices)
13978  */
13979  __Pyx_TraceLine(696,0,__PYX_ERR(1, 696, __pyx_L1_error))
13980  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 696, __pyx_L1_error)
13981  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
13982 
13983  /* "View.MemoryView":697
13984  *
13985  * nslices = ndim - len(result)
13986  * if nslices: # <<<<<<<<<<<<<<
13987  * result.extend([slice(None)] * nslices)
13988  *
13989  */
13990  __Pyx_TraceLine(697,0,__PYX_ERR(1, 697, __pyx_L1_error))
13991  __pyx_t_1 = (__pyx_v_nslices != 0);
13992  if (__pyx_t_1) {
13993 
13994  /* "View.MemoryView":698
13995  * nslices = ndim - len(result)
13996  * if nslices:
13997  * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<<
13998  *
13999  * return have_slices or nslices, tuple(result)
14000  */
14001  __Pyx_TraceLine(698,0,__PYX_ERR(1, 698, __pyx_L1_error))
14002  __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error)
14003  __Pyx_GOTREF(__pyx_t_3);
14004  { Py_ssize_t __pyx_temp;
14005  for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
14006  __Pyx_INCREF(__pyx_slice__32);
14007  __Pyx_GIVEREF(__pyx_slice__32);
14008  PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__32);
14009  }
14010  }
14011  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 698, __pyx_L1_error)
14012  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14013 
14014  /* "View.MemoryView":697
14015  *
14016  * nslices = ndim - len(result)
14017  * if nslices: # <<<<<<<<<<<<<<
14018  * result.extend([slice(None)] * nslices)
14019  *
14020  */
14021  }
14022 
14023  /* "View.MemoryView":700
14024  * result.extend([slice(None)] * nslices)
14025  *
14026  * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<<
14027  *
14028  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
14029  */
14030  __Pyx_TraceLine(700,0,__PYX_ERR(1, 700, __pyx_L1_error))
14031  __Pyx_XDECREF(__pyx_r);
14032  if (!__pyx_v_have_slices) {
14033  } else {
14034  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error)
14035  __Pyx_GOTREF(__pyx_t_4);
14036  __pyx_t_3 = __pyx_t_4;
14037  __pyx_t_4 = 0;
14038  goto __pyx_L14_bool_binop_done;
14039  }
14040  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error)
14041  __Pyx_GOTREF(__pyx_t_4);
14042  __pyx_t_3 = __pyx_t_4;
14043  __pyx_t_4 = 0;
14044  __pyx_L14_bool_binop_done:;
14045  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 700, __pyx_L1_error)
14046  __Pyx_GOTREF(__pyx_t_4);
14047  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 700, __pyx_L1_error)
14048  __Pyx_GOTREF(__pyx_t_11);
14049  __Pyx_GIVEREF(__pyx_t_3);
14050  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
14051  __Pyx_GIVEREF(__pyx_t_4);
14052  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
14053  __pyx_t_3 = 0;
14054  __pyx_t_4 = 0;
14055  __pyx_r = ((PyObject*)__pyx_t_11);
14056  __pyx_t_11 = 0;
14057  goto __pyx_L0;
14058 
14059  /* "View.MemoryView":668
14060  * return isinstance(o, memoryview)
14061  *
14062  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
14063  * """
14064  * Replace all ellipses with full slices and fill incomplete indices with
14065  */
14066 
14067  /* function exit code */
14068  __pyx_L1_error:;
14069  __Pyx_XDECREF(__pyx_t_3);
14070  __Pyx_XDECREF(__pyx_t_4);
14071  __Pyx_XDECREF(__pyx_t_7);
14072  __Pyx_XDECREF(__pyx_t_11);
14073  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
14074  __pyx_r = 0;
14075  __pyx_L0:;
14076  __Pyx_XDECREF(__pyx_v_tup);
14077  __Pyx_XDECREF(__pyx_v_result);
14078  __Pyx_XDECREF(__pyx_v_idx);
14079  __Pyx_XDECREF(__pyx_v_item);
14080  __Pyx_XGIVEREF(__pyx_r);
14081  __Pyx_TraceReturn(__pyx_r, 0);
14082  __Pyx_RefNannyFinishContext();
14083  return __pyx_r;
14084 }
14085 
14086 /* "View.MemoryView":702
14087  * return have_slices or nslices, tuple(result)
14088  *
14089  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
14090  * for suboffset in suboffsets[:ndim]:
14091  * if suboffset >= 0:
14092  */
14093 
14094 static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
14095  Py_ssize_t __pyx_v_suboffset;
14096  PyObject *__pyx_r = NULL;
14097  __Pyx_TraceDeclarations
14098  __Pyx_RefNannyDeclarations
14099  Py_ssize_t *__pyx_t_1;
14100  Py_ssize_t *__pyx_t_2;
14101  Py_ssize_t *__pyx_t_3;
14102  int __pyx_t_4;
14103  PyObject *__pyx_t_5 = NULL;
14104  int __pyx_lineno = 0;
14105  const char *__pyx_filename = NULL;
14106  int __pyx_clineno = 0;
14107  __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
14108  __Pyx_TraceCall("assert_direct_dimensions", __pyx_f[1], 702, 0, __PYX_ERR(1, 702, __pyx_L1_error));
14109 
14110  /* "View.MemoryView":703
14111  *
14112  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
14113  * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
14114  * if suboffset >= 0:
14115  * raise ValueError("Indirect dimensions not supported")
14116  */
14117  __Pyx_TraceLine(703,0,__PYX_ERR(1, 703, __pyx_L1_error))
14118  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
14119  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
14120  __pyx_t_1 = __pyx_t_3;
14121  __pyx_v_suboffset = (__pyx_t_1[0]);
14122 
14123  /* "View.MemoryView":704
14124  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
14125  * for suboffset in suboffsets[:ndim]:
14126  * if suboffset >= 0: # <<<<<<<<<<<<<<
14127  * raise ValueError("Indirect dimensions not supported")
14128  *
14129  */
14130  __Pyx_TraceLine(704,0,__PYX_ERR(1, 704, __pyx_L1_error))
14131  __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
14132  if (unlikely(__pyx_t_4)) {
14133 
14134  /* "View.MemoryView":705
14135  * for suboffset in suboffsets[:ndim]:
14136  * if suboffset >= 0:
14137  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
14138  *
14139  *
14140  */
14141  __Pyx_TraceLine(705,0,__PYX_ERR(1, 705, __pyx_L1_error))
14142  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 705, __pyx_L1_error)
14143  __Pyx_GOTREF(__pyx_t_5);
14144  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
14145  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14146  __PYX_ERR(1, 705, __pyx_L1_error)
14147 
14148  /* "View.MemoryView":704
14149  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
14150  * for suboffset in suboffsets[:ndim]:
14151  * if suboffset >= 0: # <<<<<<<<<<<<<<
14152  * raise ValueError("Indirect dimensions not supported")
14153  *
14154  */
14155  }
14156  }
14157 
14158  /* "View.MemoryView":702
14159  * return have_slices or nslices, tuple(result)
14160  *
14161  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
14162  * for suboffset in suboffsets[:ndim]:
14163  * if suboffset >= 0:
14164  */
14165 
14166  /* function exit code */
14167  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14168  goto __pyx_L0;
14169  __pyx_L1_error:;
14170  __Pyx_XDECREF(__pyx_t_5);
14171  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
14172  __pyx_r = 0;
14173  __pyx_L0:;
14174  __Pyx_XGIVEREF(__pyx_r);
14175  __Pyx_TraceReturn(__pyx_r, 0);
14176  __Pyx_RefNannyFinishContext();
14177  return __pyx_r;
14178 }
14179 
14180 /* "View.MemoryView":712
14181  *
14182  * @cname('__pyx_memview_slice')
14183  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
14184  * cdef int new_ndim = 0, suboffset_dim = -1, dim
14185  * cdef bint negative_step
14186  */
14187 
14188 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
14189  int __pyx_v_new_ndim;
14190  int __pyx_v_suboffset_dim;
14191  int __pyx_v_dim;
14192  __Pyx_memviewslice __pyx_v_src;
14193  __Pyx_memviewslice __pyx_v_dst;
14194  __Pyx_memviewslice *__pyx_v_p_src;
14195  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
14196  __Pyx_memviewslice *__pyx_v_p_dst;
14197  int *__pyx_v_p_suboffset_dim;
14198  Py_ssize_t __pyx_v_start;
14199  Py_ssize_t __pyx_v_stop;
14200  Py_ssize_t __pyx_v_step;
14201  int __pyx_v_have_start;
14202  int __pyx_v_have_stop;
14203  int __pyx_v_have_step;
14204  PyObject *__pyx_v_index = NULL;
14205  struct __pyx_memoryview_obj *__pyx_r = NULL;
14206  __Pyx_TraceDeclarations
14207  __Pyx_RefNannyDeclarations
14208  int __pyx_t_1;
14209  int __pyx_t_2;
14210  PyObject *__pyx_t_3 = NULL;
14211  struct __pyx_memoryview_obj *__pyx_t_4;
14212  char *__pyx_t_5;
14213  int __pyx_t_6;
14214  Py_ssize_t __pyx_t_7;
14215  PyObject *(*__pyx_t_8)(PyObject *);
14216  PyObject *__pyx_t_9 = NULL;
14217  Py_ssize_t __pyx_t_10;
14218  int __pyx_t_11;
14219  Py_ssize_t __pyx_t_12;
14220  int __pyx_lineno = 0;
14221  const char *__pyx_filename = NULL;
14222  int __pyx_clineno = 0;
14223  __Pyx_RefNannySetupContext("memview_slice", 0);
14224  __Pyx_TraceCall("memview_slice", __pyx_f[1], 712, 0, __PYX_ERR(1, 712, __pyx_L1_error));
14225 
14226  /* "View.MemoryView":713
14227  * @cname('__pyx_memview_slice')
14228  * cdef memoryview memview_slice(memoryview memview, object indices):
14229  * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
14230  * cdef bint negative_step
14231  * cdef __Pyx_memviewslice src, dst
14232  */
14233  __Pyx_TraceLine(713,0,__PYX_ERR(1, 713, __pyx_L1_error))
14234  __pyx_v_new_ndim = 0;
14235  __pyx_v_suboffset_dim = -1;
14236 
14237  /* "View.MemoryView":720
14238  *
14239  *
14240  * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
14241  *
14242  * cdef _memoryviewslice memviewsliceobj
14243  */
14244  __Pyx_TraceLine(720,0,__PYX_ERR(1, 720, __pyx_L1_error))
14245  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
14246 
14247  /* "View.MemoryView":724
14248  * cdef _memoryviewslice memviewsliceobj
14249  *
14250  * assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
14251  *
14252  * if isinstance(memview, _memoryviewslice):
14253  */
14254  __Pyx_TraceLine(724,0,__PYX_ERR(1, 724, __pyx_L1_error))
14255  #ifndef CYTHON_WITHOUT_ASSERTIONS
14256  if (unlikely(__pyx_assertions_enabled())) {
14257  if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
14258  PyErr_SetNone(PyExc_AssertionError);
14259  __PYX_ERR(1, 724, __pyx_L1_error)
14260  }
14261  }
14262  #endif
14263 
14264  /* "View.MemoryView":726
14265  * assert memview.view.ndim > 0
14266  *
14267  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14268  * memviewsliceobj = memview
14269  * p_src = &memviewsliceobj.from_slice
14270  */
14271  __Pyx_TraceLine(726,0,__PYX_ERR(1, 726, __pyx_L1_error))
14272  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
14273  __pyx_t_2 = (__pyx_t_1 != 0);
14274  if (__pyx_t_2) {
14275 
14276  /* "View.MemoryView":727
14277  *
14278  * if isinstance(memview, _memoryviewslice):
14279  * memviewsliceobj = memview # <<<<<<<<<<<<<<
14280  * p_src = &memviewsliceobj.from_slice
14281  * else:
14282  */
14283  __Pyx_TraceLine(727,0,__PYX_ERR(1, 727, __pyx_L1_error))
14284  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 727, __pyx_L1_error)
14285  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
14286  __Pyx_INCREF(__pyx_t_3);
14287  __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
14288  __pyx_t_3 = 0;
14289 
14290  /* "View.MemoryView":728
14291  * if isinstance(memview, _memoryviewslice):
14292  * memviewsliceobj = memview
14293  * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
14294  * else:
14295  * slice_copy(memview, &src)
14296  */
14297  __Pyx_TraceLine(728,0,__PYX_ERR(1, 728, __pyx_L1_error))
14298  __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
14299 
14300  /* "View.MemoryView":726
14301  * assert memview.view.ndim > 0
14302  *
14303  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14304  * memviewsliceobj = memview
14305  * p_src = &memviewsliceobj.from_slice
14306  */
14307  goto __pyx_L3;
14308  }
14309 
14310  /* "View.MemoryView":730
14311  * p_src = &memviewsliceobj.from_slice
14312  * else:
14313  * slice_copy(memview, &src) # <<<<<<<<<<<<<<
14314  * p_src = &src
14315  *
14316  */
14317  __Pyx_TraceLine(730,0,__PYX_ERR(1, 730, __pyx_L1_error))
14318  /*else*/ {
14319  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
14320 
14321  /* "View.MemoryView":731
14322  * else:
14323  * slice_copy(memview, &src)
14324  * p_src = &src # <<<<<<<<<<<<<<
14325  *
14326  *
14327  */
14328  __Pyx_TraceLine(731,0,__PYX_ERR(1, 731, __pyx_L1_error))
14329  __pyx_v_p_src = (&__pyx_v_src);
14330  }
14331  __pyx_L3:;
14332 
14333  /* "View.MemoryView":737
14334  *
14335  *
14336  * dst.memview = p_src.memview # <<<<<<<<<<<<<<
14337  * dst.data = p_src.data
14338  *
14339  */
14340  __Pyx_TraceLine(737,0,__PYX_ERR(1, 737, __pyx_L1_error))
14341  __pyx_t_4 = __pyx_v_p_src->memview;
14342  __pyx_v_dst.memview = __pyx_t_4;
14343 
14344  /* "View.MemoryView":738
14345  *
14346  * dst.memview = p_src.memview
14347  * dst.data = p_src.data # <<<<<<<<<<<<<<
14348  *
14349  *
14350  */
14351  __Pyx_TraceLine(738,0,__PYX_ERR(1, 738, __pyx_L1_error))
14352  __pyx_t_5 = __pyx_v_p_src->data;
14353  __pyx_v_dst.data = __pyx_t_5;
14354 
14355  /* "View.MemoryView":743
14356  *
14357  *
14358  * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
14359  * cdef int *p_suboffset_dim = &suboffset_dim
14360  * cdef Py_ssize_t start, stop, step
14361  */
14362  __Pyx_TraceLine(743,0,__PYX_ERR(1, 743, __pyx_L1_error))
14363  __pyx_v_p_dst = (&__pyx_v_dst);
14364 
14365  /* "View.MemoryView":744
14366  *
14367  * cdef __Pyx_memviewslice *p_dst = &dst
14368  * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
14369  * cdef Py_ssize_t start, stop, step
14370  * cdef bint have_start, have_stop, have_step
14371  */
14372  __Pyx_TraceLine(744,0,__PYX_ERR(1, 744, __pyx_L1_error))
14373  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
14374 
14375  /* "View.MemoryView":748
14376  * cdef bint have_start, have_stop, have_step
14377  *
14378  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
14379  * if PyIndex_Check(index):
14380  * slice_memviewslice(
14381  */
14382  __Pyx_TraceLine(748,0,__PYX_ERR(1, 748, __pyx_L1_error))
14383  __pyx_t_6 = 0;
14384  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
14385  __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
14386  __pyx_t_8 = NULL;
14387  } else {
14388  __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 748, __pyx_L1_error)
14389  __Pyx_GOTREF(__pyx_t_3);
14390  __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 748, __pyx_L1_error)
14391  }
14392  for (;;) {
14393  if (likely(!__pyx_t_8)) {
14394  if (likely(PyList_CheckExact(__pyx_t_3))) {
14395  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
14396  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14397  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 748, __pyx_L1_error)
14398  #else
14399  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 748, __pyx_L1_error)
14400  __Pyx_GOTREF(__pyx_t_9);
14401  #endif
14402  } else {
14403  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
14404  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14405  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 748, __pyx_L1_error)
14406  #else
14407  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 748, __pyx_L1_error)
14408  __Pyx_GOTREF(__pyx_t_9);
14409  #endif
14410  }
14411  } else {
14412  __pyx_t_9 = __pyx_t_8(__pyx_t_3);
14413  if (unlikely(!__pyx_t_9)) {
14414  PyObject* exc_type = PyErr_Occurred();
14415  if (exc_type) {
14416  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14417  else __PYX_ERR(1, 748, __pyx_L1_error)
14418  }
14419  break;
14420  }
14421  __Pyx_GOTREF(__pyx_t_9);
14422  }
14423  __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
14424  __pyx_t_9 = 0;
14425  __pyx_v_dim = __pyx_t_6;
14426  __pyx_t_6 = (__pyx_t_6 + 1);
14427 
14428  /* "View.MemoryView":749
14429  *
14430  * for dim, index in enumerate(indices):
14431  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
14432  * slice_memviewslice(
14433  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14434  */
14435  __Pyx_TraceLine(749,0,__PYX_ERR(1, 749, __pyx_L1_error))
14436  __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
14437  if (__pyx_t_2) {
14438 
14439  /* "View.MemoryView":753
14440  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14441  * dim, new_ndim, p_suboffset_dim,
14442  * index, 0, 0, # start, stop, step # <<<<<<<<<<<<<<
14443  * 0, 0, 0, # have_{start,stop,step}
14444  * False)
14445  */
14446  __Pyx_TraceLine(753,0,__PYX_ERR(1, 753, __pyx_L1_error))
14447  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 753, __pyx_L1_error)
14448 
14449  /* "View.MemoryView":750
14450  * for dim, index in enumerate(indices):
14451  * if PyIndex_Check(index):
14452  * slice_memviewslice( # <<<<<<<<<<<<<<
14453  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14454  * dim, new_ndim, p_suboffset_dim,
14455  */
14456  __Pyx_TraceLine(750,0,__PYX_ERR(1, 750, __pyx_L1_error))
14457  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 750, __pyx_L1_error)
14458 
14459  /* "View.MemoryView":749
14460  *
14461  * for dim, index in enumerate(indices):
14462  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
14463  * slice_memviewslice(
14464  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14465  */
14466  goto __pyx_L6;
14467  }
14468 
14469  /* "View.MemoryView":756
14470  * 0, 0, 0, # have_{start,stop,step}
14471  * False)
14472  * elif index is None: # <<<<<<<<<<<<<<
14473  * p_dst.shape[new_ndim] = 1
14474  * p_dst.strides[new_ndim] = 0
14475  */
14476  __Pyx_TraceLine(756,0,__PYX_ERR(1, 756, __pyx_L1_error))
14477  __pyx_t_2 = (__pyx_v_index == Py_None);
14478  __pyx_t_1 = (__pyx_t_2 != 0);
14479  if (__pyx_t_1) {
14480 
14481  /* "View.MemoryView":757
14482  * False)
14483  * elif index is None:
14484  * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
14485  * p_dst.strides[new_ndim] = 0
14486  * p_dst.suboffsets[new_ndim] = -1
14487  */
14488  __Pyx_TraceLine(757,0,__PYX_ERR(1, 757, __pyx_L1_error))
14489  (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
14490 
14491  /* "View.MemoryView":758
14492  * elif index is None:
14493  * p_dst.shape[new_ndim] = 1
14494  * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
14495  * p_dst.suboffsets[new_ndim] = -1
14496  * new_ndim += 1
14497  */
14498  __Pyx_TraceLine(758,0,__PYX_ERR(1, 758, __pyx_L1_error))
14499  (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
14500 
14501  /* "View.MemoryView":759
14502  * p_dst.shape[new_ndim] = 1
14503  * p_dst.strides[new_ndim] = 0
14504  * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
14505  * new_ndim += 1
14506  * else:
14507  */
14508  __Pyx_TraceLine(759,0,__PYX_ERR(1, 759, __pyx_L1_error))
14509  (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
14510 
14511  /* "View.MemoryView":760
14512  * p_dst.strides[new_ndim] = 0
14513  * p_dst.suboffsets[new_ndim] = -1
14514  * new_ndim += 1 # <<<<<<<<<<<<<<
14515  * else:
14516  * start = index.start or 0
14517  */
14518  __Pyx_TraceLine(760,0,__PYX_ERR(1, 760, __pyx_L1_error))
14519  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
14520 
14521  /* "View.MemoryView":756
14522  * 0, 0, 0, # have_{start,stop,step}
14523  * False)
14524  * elif index is None: # <<<<<<<<<<<<<<
14525  * p_dst.shape[new_ndim] = 1
14526  * p_dst.strides[new_ndim] = 0
14527  */
14528  goto __pyx_L6;
14529  }
14530 
14531  /* "View.MemoryView":762
14532  * new_ndim += 1
14533  * else:
14534  * start = index.start or 0 # <<<<<<<<<<<<<<
14535  * stop = index.stop or 0
14536  * step = index.step or 0
14537  */
14538  __Pyx_TraceLine(762,0,__PYX_ERR(1, 762, __pyx_L1_error))
14539  /*else*/ {
14540  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 762, __pyx_L1_error)
14541  __Pyx_GOTREF(__pyx_t_9);
14542  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 762, __pyx_L1_error)
14543  if (!__pyx_t_1) {
14544  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14545  } else {
14546  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)
14547  __pyx_t_10 = __pyx_t_12;
14548  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14549  goto __pyx_L7_bool_binop_done;
14550  }
14551  __pyx_t_10 = 0;
14552  __pyx_L7_bool_binop_done:;
14553  __pyx_v_start = __pyx_t_10;
14554 
14555  /* "View.MemoryView":763
14556  * else:
14557  * start = index.start or 0
14558  * stop = index.stop or 0 # <<<<<<<<<<<<<<
14559  * step = index.step or 0
14560  *
14561  */
14562  __Pyx_TraceLine(763,0,__PYX_ERR(1, 763, __pyx_L1_error))
14563  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 763, __pyx_L1_error)
14564  __Pyx_GOTREF(__pyx_t_9);
14565  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 763, __pyx_L1_error)
14566  if (!__pyx_t_1) {
14567  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14568  } else {
14569  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error)
14570  __pyx_t_10 = __pyx_t_12;
14571  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14572  goto __pyx_L9_bool_binop_done;
14573  }
14574  __pyx_t_10 = 0;
14575  __pyx_L9_bool_binop_done:;
14576  __pyx_v_stop = __pyx_t_10;
14577 
14578  /* "View.MemoryView":764
14579  * start = index.start or 0
14580  * stop = index.stop or 0
14581  * step = index.step or 0 # <<<<<<<<<<<<<<
14582  *
14583  * have_start = index.start is not None
14584  */
14585  __Pyx_TraceLine(764,0,__PYX_ERR(1, 764, __pyx_L1_error))
14586  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 764, __pyx_L1_error)
14587  __Pyx_GOTREF(__pyx_t_9);
14588  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 764, __pyx_L1_error)
14589  if (!__pyx_t_1) {
14590  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14591  } else {
14592  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error)
14593  __pyx_t_10 = __pyx_t_12;
14594  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14595  goto __pyx_L11_bool_binop_done;
14596  }
14597  __pyx_t_10 = 0;
14598  __pyx_L11_bool_binop_done:;
14599  __pyx_v_step = __pyx_t_10;
14600 
14601  /* "View.MemoryView":766
14602  * step = index.step or 0
14603  *
14604  * have_start = index.start is not None # <<<<<<<<<<<<<<
14605  * have_stop = index.stop is not None
14606  * have_step = index.step is not None
14607  */
14608  __Pyx_TraceLine(766,0,__PYX_ERR(1, 766, __pyx_L1_error))
14609  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 766, __pyx_L1_error)
14610  __Pyx_GOTREF(__pyx_t_9);
14611  __pyx_t_1 = (__pyx_t_9 != Py_None);
14612  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14613  __pyx_v_have_start = __pyx_t_1;
14614 
14615  /* "View.MemoryView":767
14616  *
14617  * have_start = index.start is not None
14618  * have_stop = index.stop is not None # <<<<<<<<<<<<<<
14619  * have_step = index.step is not None
14620  *
14621  */
14622  __Pyx_TraceLine(767,0,__PYX_ERR(1, 767, __pyx_L1_error))
14623  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 767, __pyx_L1_error)
14624  __Pyx_GOTREF(__pyx_t_9);
14625  __pyx_t_1 = (__pyx_t_9 != Py_None);
14626  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14627  __pyx_v_have_stop = __pyx_t_1;
14628 
14629  /* "View.MemoryView":768
14630  * have_start = index.start is not None
14631  * have_stop = index.stop is not None
14632  * have_step = index.step is not None # <<<<<<<<<<<<<<
14633  *
14634  * slice_memviewslice(
14635  */
14636  __Pyx_TraceLine(768,0,__PYX_ERR(1, 768, __pyx_L1_error))
14637  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 768, __pyx_L1_error)
14638  __Pyx_GOTREF(__pyx_t_9);
14639  __pyx_t_1 = (__pyx_t_9 != Py_None);
14640  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14641  __pyx_v_have_step = __pyx_t_1;
14642 
14643  /* "View.MemoryView":770
14644  * have_step = index.step is not None
14645  *
14646  * slice_memviewslice( # <<<<<<<<<<<<<<
14647  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
14648  * dim, new_ndim, p_suboffset_dim,
14649  */
14650  __Pyx_TraceLine(770,0,__PYX_ERR(1, 770, __pyx_L1_error))
14651  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 770, __pyx_L1_error)
14652 
14653  /* "View.MemoryView":776
14654  * have_start, have_stop, have_step,
14655  * True)
14656  * new_ndim += 1 # <<<<<<<<<<<<<<
14657  *
14658  * if isinstance(memview, _memoryviewslice):
14659  */
14660  __Pyx_TraceLine(776,0,__PYX_ERR(1, 776, __pyx_L1_error))
14661  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
14662  }
14663  __pyx_L6:;
14664 
14665  /* "View.MemoryView":748
14666  * cdef bint have_start, have_stop, have_step
14667  *
14668  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
14669  * if PyIndex_Check(index):
14670  * slice_memviewslice(
14671  */
14672  __Pyx_TraceLine(748,0,__PYX_ERR(1, 748, __pyx_L1_error))
14673  }
14674  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14675 
14676  /* "View.MemoryView":778
14677  * new_ndim += 1
14678  *
14679  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14680  * return memoryview_fromslice(dst, new_ndim,
14681  * memviewsliceobj.to_object_func,
14682  */
14683  __Pyx_TraceLine(778,0,__PYX_ERR(1, 778, __pyx_L1_error))
14684  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
14685  __pyx_t_2 = (__pyx_t_1 != 0);
14686  if (__pyx_t_2) {
14687 
14688  /* "View.MemoryView":779
14689  *
14690  * if isinstance(memview, _memoryviewslice):
14691  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
14692  * memviewsliceobj.to_object_func,
14693  * memviewsliceobj.to_dtype_func,
14694  */
14695  __Pyx_TraceLine(779,0,__PYX_ERR(1, 779, __pyx_L1_error))
14696  __Pyx_XDECREF(((PyObject *)__pyx_r));
14697 
14698  /* "View.MemoryView":780
14699  * if isinstance(memview, _memoryviewslice):
14700  * return memoryview_fromslice(dst, new_ndim,
14701  * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
14702  * memviewsliceobj.to_dtype_func,
14703  * memview.dtype_is_object)
14704  */
14705  __Pyx_TraceLine(780,0,__PYX_ERR(1, 780, __pyx_L1_error))
14706  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 780, __pyx_L1_error) }
14707 
14708  /* "View.MemoryView":781
14709  * return memoryview_fromslice(dst, new_ndim,
14710  * memviewsliceobj.to_object_func,
14711  * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
14712  * memview.dtype_is_object)
14713  * else:
14714  */
14715  __Pyx_TraceLine(781,0,__PYX_ERR(1, 781, __pyx_L1_error))
14716  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) }
14717 
14718  /* "View.MemoryView":779
14719  *
14720  * if isinstance(memview, _memoryviewslice):
14721  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
14722  * memviewsliceobj.to_object_func,
14723  * memviewsliceobj.to_dtype_func,
14724  */
14725  __Pyx_TraceLine(779,0,__PYX_ERR(1, 779, __pyx_L1_error))
14726  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 779, __pyx_L1_error)
14727  __Pyx_GOTREF(__pyx_t_3);
14728  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 779, __pyx_L1_error)
14729  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
14730  __pyx_t_3 = 0;
14731  goto __pyx_L0;
14732 
14733  /* "View.MemoryView":778
14734  * new_ndim += 1
14735  *
14736  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
14737  * return memoryview_fromslice(dst, new_ndim,
14738  * memviewsliceobj.to_object_func,
14739  */
14740  }
14741 
14742  /* "View.MemoryView":784
14743  * memview.dtype_is_object)
14744  * else:
14745  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
14746  * memview.dtype_is_object)
14747  *
14748  */
14749  __Pyx_TraceLine(784,0,__PYX_ERR(1, 784, __pyx_L1_error))
14750  /*else*/ {
14751  __Pyx_XDECREF(((PyObject *)__pyx_r));
14752 
14753  /* "View.MemoryView":785
14754  * else:
14755  * return memoryview_fromslice(dst, new_ndim, NULL, NULL,
14756  * memview.dtype_is_object) # <<<<<<<<<<<<<<
14757  *
14758  *
14759  */
14760  __Pyx_TraceLine(785,0,__PYX_ERR(1, 785, __pyx_L1_error))
14761  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 784, __pyx_L1_error)
14762  __Pyx_GOTREF(__pyx_t_3);
14763 
14764  /* "View.MemoryView":784
14765  * memview.dtype_is_object)
14766  * else:
14767  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
14768  * memview.dtype_is_object)
14769  *
14770  */
14771  __Pyx_TraceLine(784,0,__PYX_ERR(1, 784, __pyx_L1_error))
14772  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 784, __pyx_L1_error)
14773  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
14774  __pyx_t_3 = 0;
14775  goto __pyx_L0;
14776  }
14777 
14778  /* "View.MemoryView":712
14779  *
14780  * @cname('__pyx_memview_slice')
14781  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
14782  * cdef int new_ndim = 0, suboffset_dim = -1, dim
14783  * cdef bint negative_step
14784  */
14785 
14786  /* function exit code */
14787  __pyx_L1_error:;
14788  __Pyx_XDECREF(__pyx_t_3);
14789  __Pyx_XDECREF(__pyx_t_9);
14790  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
14791  __pyx_r = 0;
14792  __pyx_L0:;
14793  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
14794  __Pyx_XDECREF(__pyx_v_index);
14795  __Pyx_XGIVEREF((PyObject *)__pyx_r);
14796  __Pyx_TraceReturn(__pyx_r, 0);
14797  __Pyx_RefNannyFinishContext();
14798  return __pyx_r;
14799 }
14800 
14801 /* "View.MemoryView":809
14802  *
14803  * @cname('__pyx_memoryview_slice_memviewslice')
14804  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
14805  * __Pyx_memviewslice *dst,
14806  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
14807  */
14808 
14809 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
14810  Py_ssize_t __pyx_v_new_shape;
14811  int __pyx_v_negative_step;
14812  int __pyx_r;
14813  __Pyx_TraceDeclarations
14814  int __pyx_t_1;
14815  int __pyx_t_2;
14816  int __pyx_t_3;
14817  int __pyx_lineno = 0;
14818  const char *__pyx_filename = NULL;
14819  int __pyx_clineno = 0;
14820  __Pyx_TraceCall("slice_memviewslice", __pyx_f[1], 809, 1, __PYX_ERR(1, 809, __pyx_L1_error));
14821 
14822  /* "View.MemoryView":829
14823  * cdef bint negative_step
14824  *
14825  * if not is_slice: # <<<<<<<<<<<<<<
14826  *
14827  * if start < 0:
14828  */
14829  __Pyx_TraceLine(829,1,__PYX_ERR(1, 829, __pyx_L1_error))
14830  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
14831  if (__pyx_t_1) {
14832 
14833  /* "View.MemoryView":831
14834  * if not is_slice:
14835  *
14836  * if start < 0: # <<<<<<<<<<<<<<
14837  * start += shape
14838  * if not 0 <= start < shape:
14839  */
14840  __Pyx_TraceLine(831,1,__PYX_ERR(1, 831, __pyx_L1_error))
14841  __pyx_t_1 = ((__pyx_v_start < 0) != 0);
14842  if (__pyx_t_1) {
14843 
14844  /* "View.MemoryView":832
14845  *
14846  * if start < 0:
14847  * start += shape # <<<<<<<<<<<<<<
14848  * if not 0 <= start < shape:
14849  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
14850  */
14851  __Pyx_TraceLine(832,1,__PYX_ERR(1, 832, __pyx_L1_error))
14852  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
14853 
14854  /* "View.MemoryView":831
14855  * if not is_slice:
14856  *
14857  * if start < 0: # <<<<<<<<<<<<<<
14858  * start += shape
14859  * if not 0 <= start < shape:
14860  */
14861  }
14862 
14863  /* "View.MemoryView":833
14864  * if start < 0:
14865  * start += shape
14866  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
14867  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
14868  * else:
14869  */
14870  __Pyx_TraceLine(833,1,__PYX_ERR(1, 833, __pyx_L1_error))
14871  __pyx_t_1 = (0 <= __pyx_v_start);
14872  if (__pyx_t_1) {
14873  __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
14874  }
14875  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
14876  if (__pyx_t_2) {
14877 
14878  /* "View.MemoryView":834
14879  * start += shape
14880  * if not 0 <= start < shape:
14881  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<<
14882  * else:
14883  *
14884  */
14885  __Pyx_TraceLine(834,1,__PYX_ERR(1, 834, __pyx_L1_error))
14886  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 834, __pyx_L1_error)
14887 
14888  /* "View.MemoryView":833
14889  * if start < 0:
14890  * start += shape
14891  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
14892  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
14893  * else:
14894  */
14895  }
14896 
14897  /* "View.MemoryView":829
14898  * cdef bint negative_step
14899  *
14900  * if not is_slice: # <<<<<<<<<<<<<<
14901  *
14902  * if start < 0:
14903  */
14904  goto __pyx_L3;
14905  }
14906 
14907  /* "View.MemoryView":837
14908  * else:
14909  *
14910  * negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<<
14911  *
14912  * if have_step and step == 0:
14913  */
14914  __Pyx_TraceLine(837,1,__PYX_ERR(1, 837, __pyx_L1_error))
14915  /*else*/ {
14916  __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
14917  if (__pyx_t_1) {
14918  } else {
14919  __pyx_t_2 = __pyx_t_1;
14920  goto __pyx_L6_bool_binop_done;
14921  }
14922  __pyx_t_1 = ((__pyx_v_step < 0) != 0);
14923  __pyx_t_2 = __pyx_t_1;
14924  __pyx_L6_bool_binop_done:;
14925  __pyx_v_negative_step = __pyx_t_2;
14926 
14927  /* "View.MemoryView":839
14928  * negative_step = have_step != 0 and step < 0
14929  *
14930  * if have_step and step == 0: # <<<<<<<<<<<<<<
14931  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
14932  *
14933  */
14934  __Pyx_TraceLine(839,1,__PYX_ERR(1, 839, __pyx_L1_error))
14935  __pyx_t_1 = (__pyx_v_have_step != 0);
14936  if (__pyx_t_1) {
14937  } else {
14938  __pyx_t_2 = __pyx_t_1;
14939  goto __pyx_L9_bool_binop_done;
14940  }
14941  __pyx_t_1 = ((__pyx_v_step == 0) != 0);
14942  __pyx_t_2 = __pyx_t_1;
14943  __pyx_L9_bool_binop_done:;
14944  if (__pyx_t_2) {
14945 
14946  /* "View.MemoryView":840
14947  *
14948  * if have_step and step == 0:
14949  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<<
14950  *
14951  *
14952  */
14953  __Pyx_TraceLine(840,1,__PYX_ERR(1, 840, __pyx_L1_error))
14954  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 840, __pyx_L1_error)
14955 
14956  /* "View.MemoryView":839
14957  * negative_step = have_step != 0 and step < 0
14958  *
14959  * if have_step and step == 0: # <<<<<<<<<<<<<<
14960  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
14961  *
14962  */
14963  }
14964 
14965  /* "View.MemoryView":843
14966  *
14967  *
14968  * if have_start: # <<<<<<<<<<<<<<
14969  * if start < 0:
14970  * start += shape
14971  */
14972  __Pyx_TraceLine(843,1,__PYX_ERR(1, 843, __pyx_L1_error))
14973  __pyx_t_2 = (__pyx_v_have_start != 0);
14974  if (__pyx_t_2) {
14975 
14976  /* "View.MemoryView":844
14977  *
14978  * if have_start:
14979  * if start < 0: # <<<<<<<<<<<<<<
14980  * start += shape
14981  * if start < 0:
14982  */
14983  __Pyx_TraceLine(844,1,__PYX_ERR(1, 844, __pyx_L1_error))
14984  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
14985  if (__pyx_t_2) {
14986 
14987  /* "View.MemoryView":845
14988  * if have_start:
14989  * if start < 0:
14990  * start += shape # <<<<<<<<<<<<<<
14991  * if start < 0:
14992  * start = 0
14993  */
14994  __Pyx_TraceLine(845,1,__PYX_ERR(1, 845, __pyx_L1_error))
14995  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
14996 
14997  /* "View.MemoryView":846
14998  * if start < 0:
14999  * start += shape
15000  * if start < 0: # <<<<<<<<<<<<<<
15001  * start = 0
15002  * elif start >= shape:
15003  */
15004  __Pyx_TraceLine(846,1,__PYX_ERR(1, 846, __pyx_L1_error))
15005  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
15006  if (__pyx_t_2) {
15007 
15008  /* "View.MemoryView":847
15009  * start += shape
15010  * if start < 0:
15011  * start = 0 # <<<<<<<<<<<<<<
15012  * elif start >= shape:
15013  * if negative_step:
15014  */
15015  __Pyx_TraceLine(847,1,__PYX_ERR(1, 847, __pyx_L1_error))
15016  __pyx_v_start = 0;
15017 
15018  /* "View.MemoryView":846
15019  * if start < 0:
15020  * start += shape
15021  * if start < 0: # <<<<<<<<<<<<<<
15022  * start = 0
15023  * elif start >= shape:
15024  */
15025  }
15026 
15027  /* "View.MemoryView":844
15028  *
15029  * if have_start:
15030  * if start < 0: # <<<<<<<<<<<<<<
15031  * start += shape
15032  * if start < 0:
15033  */
15034  goto __pyx_L12;
15035  }
15036 
15037  /* "View.MemoryView":848
15038  * if start < 0:
15039  * start = 0
15040  * elif start >= shape: # <<<<<<<<<<<<<<
15041  * if negative_step:
15042  * start = shape - 1
15043  */
15044  __Pyx_TraceLine(848,1,__PYX_ERR(1, 848, __pyx_L1_error))
15045  __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
15046  if (__pyx_t_2) {
15047 
15048  /* "View.MemoryView":849
15049  * start = 0
15050  * elif start >= shape:
15051  * if negative_step: # <<<<<<<<<<<<<<
15052  * start = shape - 1
15053  * else:
15054  */
15055  __Pyx_TraceLine(849,1,__PYX_ERR(1, 849, __pyx_L1_error))
15056  __pyx_t_2 = (__pyx_v_negative_step != 0);
15057  if (__pyx_t_2) {
15058 
15059  /* "View.MemoryView":850
15060  * elif start >= shape:
15061  * if negative_step:
15062  * start = shape - 1 # <<<<<<<<<<<<<<
15063  * else:
15064  * start = shape
15065  */
15066  __Pyx_TraceLine(850,1,__PYX_ERR(1, 850, __pyx_L1_error))
15067  __pyx_v_start = (__pyx_v_shape - 1);
15068 
15069  /* "View.MemoryView":849
15070  * start = 0
15071  * elif start >= shape:
15072  * if negative_step: # <<<<<<<<<<<<<<
15073  * start = shape - 1
15074  * else:
15075  */
15076  goto __pyx_L14;
15077  }
15078 
15079  /* "View.MemoryView":852
15080  * start = shape - 1
15081  * else:
15082  * start = shape # <<<<<<<<<<<<<<
15083  * else:
15084  * if negative_step:
15085  */
15086  __Pyx_TraceLine(852,1,__PYX_ERR(1, 852, __pyx_L1_error))
15087  /*else*/ {
15088  __pyx_v_start = __pyx_v_shape;
15089  }
15090  __pyx_L14:;
15091 
15092  /* "View.MemoryView":848
15093  * if start < 0:
15094  * start = 0
15095  * elif start >= shape: # <<<<<<<<<<<<<<
15096  * if negative_step:
15097  * start = shape - 1
15098  */
15099  }
15100  __pyx_L12:;
15101 
15102  /* "View.MemoryView":843
15103  *
15104  *
15105  * if have_start: # <<<<<<<<<<<<<<
15106  * if start < 0:
15107  * start += shape
15108  */
15109  goto __pyx_L11;
15110  }
15111 
15112  /* "View.MemoryView":854
15113  * start = shape
15114  * else:
15115  * if negative_step: # <<<<<<<<<<<<<<
15116  * start = shape - 1
15117  * else:
15118  */
15119  __Pyx_TraceLine(854,1,__PYX_ERR(1, 854, __pyx_L1_error))
15120  /*else*/ {
15121  __pyx_t_2 = (__pyx_v_negative_step != 0);
15122  if (__pyx_t_2) {
15123 
15124  /* "View.MemoryView":855
15125  * else:
15126  * if negative_step:
15127  * start = shape - 1 # <<<<<<<<<<<<<<
15128  * else:
15129  * start = 0
15130  */
15131  __Pyx_TraceLine(855,1,__PYX_ERR(1, 855, __pyx_L1_error))
15132  __pyx_v_start = (__pyx_v_shape - 1);
15133 
15134  /* "View.MemoryView":854
15135  * start = shape
15136  * else:
15137  * if negative_step: # <<<<<<<<<<<<<<
15138  * start = shape - 1
15139  * else:
15140  */
15141  goto __pyx_L15;
15142  }
15143 
15144  /* "View.MemoryView":857
15145  * start = shape - 1
15146  * else:
15147  * start = 0 # <<<<<<<<<<<<<<
15148  *
15149  * if have_stop:
15150  */
15151  __Pyx_TraceLine(857,1,__PYX_ERR(1, 857, __pyx_L1_error))
15152  /*else*/ {
15153  __pyx_v_start = 0;
15154  }
15155  __pyx_L15:;
15156  }
15157  __pyx_L11:;
15158 
15159  /* "View.MemoryView":859
15160  * start = 0
15161  *
15162  * if have_stop: # <<<<<<<<<<<<<<
15163  * if stop < 0:
15164  * stop += shape
15165  */
15166  __Pyx_TraceLine(859,1,__PYX_ERR(1, 859, __pyx_L1_error))
15167  __pyx_t_2 = (__pyx_v_have_stop != 0);
15168  if (__pyx_t_2) {
15169 
15170  /* "View.MemoryView":860
15171  *
15172  * if have_stop:
15173  * if stop < 0: # <<<<<<<<<<<<<<
15174  * stop += shape
15175  * if stop < 0:
15176  */
15177  __Pyx_TraceLine(860,1,__PYX_ERR(1, 860, __pyx_L1_error))
15178  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
15179  if (__pyx_t_2) {
15180 
15181  /* "View.MemoryView":861
15182  * if have_stop:
15183  * if stop < 0:
15184  * stop += shape # <<<<<<<<<<<<<<
15185  * if stop < 0:
15186  * stop = 0
15187  */
15188  __Pyx_TraceLine(861,1,__PYX_ERR(1, 861, __pyx_L1_error))
15189  __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
15190 
15191  /* "View.MemoryView":862
15192  * if stop < 0:
15193  * stop += shape
15194  * if stop < 0: # <<<<<<<<<<<<<<
15195  * stop = 0
15196  * elif stop > shape:
15197  */
15198  __Pyx_TraceLine(862,1,__PYX_ERR(1, 862, __pyx_L1_error))
15199  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
15200  if (__pyx_t_2) {
15201 
15202  /* "View.MemoryView":863
15203  * stop += shape
15204  * if stop < 0:
15205  * stop = 0 # <<<<<<<<<<<<<<
15206  * elif stop > shape:
15207  * stop = shape
15208  */
15209  __Pyx_TraceLine(863,1,__PYX_ERR(1, 863, __pyx_L1_error))
15210  __pyx_v_stop = 0;
15211 
15212  /* "View.MemoryView":862
15213  * if stop < 0:
15214  * stop += shape
15215  * if stop < 0: # <<<<<<<<<<<<<<
15216  * stop = 0
15217  * elif stop > shape:
15218  */
15219  }
15220 
15221  /* "View.MemoryView":860
15222  *
15223  * if have_stop:
15224  * if stop < 0: # <<<<<<<<<<<<<<
15225  * stop += shape
15226  * if stop < 0:
15227  */
15228  goto __pyx_L17;
15229  }
15230 
15231  /* "View.MemoryView":864
15232  * if stop < 0:
15233  * stop = 0
15234  * elif stop > shape: # <<<<<<<<<<<<<<
15235  * stop = shape
15236  * else:
15237  */
15238  __Pyx_TraceLine(864,1,__PYX_ERR(1, 864, __pyx_L1_error))
15239  __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
15240  if (__pyx_t_2) {
15241 
15242  /* "View.MemoryView":865
15243  * stop = 0
15244  * elif stop > shape:
15245  * stop = shape # <<<<<<<<<<<<<<
15246  * else:
15247  * if negative_step:
15248  */
15249  __Pyx_TraceLine(865,1,__PYX_ERR(1, 865, __pyx_L1_error))
15250  __pyx_v_stop = __pyx_v_shape;
15251 
15252  /* "View.MemoryView":864
15253  * if stop < 0:
15254  * stop = 0
15255  * elif stop > shape: # <<<<<<<<<<<<<<
15256  * stop = shape
15257  * else:
15258  */
15259  }
15260  __pyx_L17:;
15261 
15262  /* "View.MemoryView":859
15263  * start = 0
15264  *
15265  * if have_stop: # <<<<<<<<<<<<<<
15266  * if stop < 0:
15267  * stop += shape
15268  */
15269  goto __pyx_L16;
15270  }
15271 
15272  /* "View.MemoryView":867
15273  * stop = shape
15274  * else:
15275  * if negative_step: # <<<<<<<<<<<<<<
15276  * stop = -1
15277  * else:
15278  */
15279  __Pyx_TraceLine(867,1,__PYX_ERR(1, 867, __pyx_L1_error))
15280  /*else*/ {
15281  __pyx_t_2 = (__pyx_v_negative_step != 0);
15282  if (__pyx_t_2) {
15283 
15284  /* "View.MemoryView":868
15285  * else:
15286  * if negative_step:
15287  * stop = -1 # <<<<<<<<<<<<<<
15288  * else:
15289  * stop = shape
15290  */
15291  __Pyx_TraceLine(868,1,__PYX_ERR(1, 868, __pyx_L1_error))
15292  __pyx_v_stop = -1L;
15293 
15294  /* "View.MemoryView":867
15295  * stop = shape
15296  * else:
15297  * if negative_step: # <<<<<<<<<<<<<<
15298  * stop = -1
15299  * else:
15300  */
15301  goto __pyx_L19;
15302  }
15303 
15304  /* "View.MemoryView":870
15305  * stop = -1
15306  * else:
15307  * stop = shape # <<<<<<<<<<<<<<
15308  *
15309  * if not have_step:
15310  */
15311  __Pyx_TraceLine(870,1,__PYX_ERR(1, 870, __pyx_L1_error))
15312  /*else*/ {
15313  __pyx_v_stop = __pyx_v_shape;
15314  }
15315  __pyx_L19:;
15316  }
15317  __pyx_L16:;
15318 
15319  /* "View.MemoryView":872
15320  * stop = shape
15321  *
15322  * if not have_step: # <<<<<<<<<<<<<<
15323  * step = 1
15324  *
15325  */
15326  __Pyx_TraceLine(872,1,__PYX_ERR(1, 872, __pyx_L1_error))
15327  __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
15328  if (__pyx_t_2) {
15329 
15330  /* "View.MemoryView":873
15331  *
15332  * if not have_step:
15333  * step = 1 # <<<<<<<<<<<<<<
15334  *
15335  *
15336  */
15337  __Pyx_TraceLine(873,1,__PYX_ERR(1, 873, __pyx_L1_error))
15338  __pyx_v_step = 1;
15339 
15340  /* "View.MemoryView":872
15341  * stop = shape
15342  *
15343  * if not have_step: # <<<<<<<<<<<<<<
15344  * step = 1
15345  *
15346  */
15347  }
15348 
15349  /* "View.MemoryView":877
15350  *
15351  * with cython.cdivision(True):
15352  * new_shape = (stop - start) // step # <<<<<<<<<<<<<<
15353  *
15354  * if (stop - start) - step * new_shape:
15355  */
15356  __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
15357 
15358  /* "View.MemoryView":879
15359  * new_shape = (stop - start) // step
15360  *
15361  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
15362  * new_shape += 1
15363  *
15364  */
15365  __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
15366  if (__pyx_t_2) {
15367 
15368  /* "View.MemoryView":880
15369  *
15370  * if (stop - start) - step * new_shape:
15371  * new_shape += 1 # <<<<<<<<<<<<<<
15372  *
15373  * if new_shape < 0:
15374  */
15375  __pyx_v_new_shape = (__pyx_v_new_shape + 1);
15376 
15377  /* "View.MemoryView":879
15378  * new_shape = (stop - start) // step
15379  *
15380  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
15381  * new_shape += 1
15382  *
15383  */
15384  }
15385 
15386  /* "View.MemoryView":882
15387  * new_shape += 1
15388  *
15389  * if new_shape < 0: # <<<<<<<<<<<<<<
15390  * new_shape = 0
15391  *
15392  */
15393  __Pyx_TraceLine(882,1,__PYX_ERR(1, 882, __pyx_L1_error))
15394  __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
15395  if (__pyx_t_2) {
15396 
15397  /* "View.MemoryView":883
15398  *
15399  * if new_shape < 0:
15400  * new_shape = 0 # <<<<<<<<<<<<<<
15401  *
15402  *
15403  */
15404  __Pyx_TraceLine(883,1,__PYX_ERR(1, 883, __pyx_L1_error))
15405  __pyx_v_new_shape = 0;
15406 
15407  /* "View.MemoryView":882
15408  * new_shape += 1
15409  *
15410  * if new_shape < 0: # <<<<<<<<<<<<<<
15411  * new_shape = 0
15412  *
15413  */
15414  }
15415 
15416  /* "View.MemoryView":886
15417  *
15418  *
15419  * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<<
15420  * dst.shape[new_ndim] = new_shape
15421  * dst.suboffsets[new_ndim] = suboffset
15422  */
15423  __Pyx_TraceLine(886,1,__PYX_ERR(1, 886, __pyx_L1_error))
15424  (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
15425 
15426  /* "View.MemoryView":887
15427  *
15428  * dst.strides[new_ndim] = stride * step
15429  * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<<
15430  * dst.suboffsets[new_ndim] = suboffset
15431  *
15432  */
15433  __Pyx_TraceLine(887,1,__PYX_ERR(1, 887, __pyx_L1_error))
15434  (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
15435 
15436  /* "View.MemoryView":888
15437  * dst.strides[new_ndim] = stride * step
15438  * dst.shape[new_ndim] = new_shape
15439  * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<<
15440  *
15441  *
15442  */
15443  __Pyx_TraceLine(888,1,__PYX_ERR(1, 888, __pyx_L1_error))
15444  (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
15445  }
15446  __pyx_L3:;
15447 
15448  /* "View.MemoryView":891
15449  *
15450  *
15451  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
15452  * dst.data += start * stride
15453  * else:
15454  */
15455  __Pyx_TraceLine(891,1,__PYX_ERR(1, 891, __pyx_L1_error))
15456  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
15457  if (__pyx_t_2) {
15458 
15459  /* "View.MemoryView":892
15460  *
15461  * if suboffset_dim[0] < 0:
15462  * dst.data += start * stride # <<<<<<<<<<<<<<
15463  * else:
15464  * dst.suboffsets[suboffset_dim[0]] += start * stride
15465  */
15466  __Pyx_TraceLine(892,1,__PYX_ERR(1, 892, __pyx_L1_error))
15467  __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
15468 
15469  /* "View.MemoryView":891
15470  *
15471  *
15472  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
15473  * dst.data += start * stride
15474  * else:
15475  */
15476  goto __pyx_L23;
15477  }
15478 
15479  /* "View.MemoryView":894
15480  * dst.data += start * stride
15481  * else:
15482  * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<<
15483  *
15484  * if suboffset >= 0:
15485  */
15486  __Pyx_TraceLine(894,1,__PYX_ERR(1, 894, __pyx_L1_error))
15487  /*else*/ {
15488  __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
15489  (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
15490  }
15491  __pyx_L23:;
15492 
15493  /* "View.MemoryView":896
15494  * dst.suboffsets[suboffset_dim[0]] += start * stride
15495  *
15496  * if suboffset >= 0: # <<<<<<<<<<<<<<
15497  * if not is_slice:
15498  * if new_ndim == 0:
15499  */
15500  __Pyx_TraceLine(896,1,__PYX_ERR(1, 896, __pyx_L1_error))
15501  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
15502  if (__pyx_t_2) {
15503 
15504  /* "View.MemoryView":897
15505  *
15506  * if suboffset >= 0:
15507  * if not is_slice: # <<<<<<<<<<<<<<
15508  * if new_ndim == 0:
15509  * dst.data = (<char **> dst.data)[0] + suboffset
15510  */
15511  __Pyx_TraceLine(897,1,__PYX_ERR(1, 897, __pyx_L1_error))
15512  __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
15513  if (__pyx_t_2) {
15514 
15515  /* "View.MemoryView":898
15516  * if suboffset >= 0:
15517  * if not is_slice:
15518  * if new_ndim == 0: # <<<<<<<<<<<<<<
15519  * dst.data = (<char **> dst.data)[0] + suboffset
15520  * else:
15521  */
15522  __Pyx_TraceLine(898,1,__PYX_ERR(1, 898, __pyx_L1_error))
15523  __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
15524  if (__pyx_t_2) {
15525 
15526  /* "View.MemoryView":899
15527  * if not is_slice:
15528  * if new_ndim == 0:
15529  * dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<<
15530  * else:
15531  * _err_dim(IndexError, "All dimensions preceding dimension %d "
15532  */
15533  __Pyx_TraceLine(899,1,__PYX_ERR(1, 899, __pyx_L1_error))
15534  __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
15535 
15536  /* "View.MemoryView":898
15537  * if suboffset >= 0:
15538  * if not is_slice:
15539  * if new_ndim == 0: # <<<<<<<<<<<<<<
15540  * dst.data = (<char **> dst.data)[0] + suboffset
15541  * else:
15542  */
15543  goto __pyx_L26;
15544  }
15545 
15546  /* "View.MemoryView":901
15547  * dst.data = (<char **> dst.data)[0] + suboffset
15548  * else:
15549  * _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<<
15550  * "must be indexed and not sliced", dim)
15551  * else:
15552  */
15553  __Pyx_TraceLine(901,1,__PYX_ERR(1, 901, __pyx_L1_error))
15554  /*else*/ {
15555 
15556  /* "View.MemoryView":902
15557  * else:
15558  * _err_dim(IndexError, "All dimensions preceding dimension %d "
15559  * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<<
15560  * else:
15561  * suboffset_dim[0] = new_ndim
15562  */
15563  __Pyx_TraceLine(902,1,__PYX_ERR(1, 902, __pyx_L1_error))
15564  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 901, __pyx_L1_error)
15565  }
15566  __pyx_L26:;
15567 
15568  /* "View.MemoryView":897
15569  *
15570  * if suboffset >= 0:
15571  * if not is_slice: # <<<<<<<<<<<<<<
15572  * if new_ndim == 0:
15573  * dst.data = (<char **> dst.data)[0] + suboffset
15574  */
15575  goto __pyx_L25;
15576  }
15577 
15578  /* "View.MemoryView":904
15579  * "must be indexed and not sliced", dim)
15580  * else:
15581  * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<<
15582  *
15583  * return 0
15584  */
15585  __Pyx_TraceLine(904,1,__PYX_ERR(1, 904, __pyx_L1_error))
15586  /*else*/ {
15587  (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
15588  }
15589  __pyx_L25:;
15590 
15591  /* "View.MemoryView":896
15592  * dst.suboffsets[suboffset_dim[0]] += start * stride
15593  *
15594  * if suboffset >= 0: # <<<<<<<<<<<<<<
15595  * if not is_slice:
15596  * if new_ndim == 0:
15597  */
15598  }
15599 
15600  /* "View.MemoryView":906
15601  * suboffset_dim[0] = new_ndim
15602  *
15603  * return 0 # <<<<<<<<<<<<<<
15604  *
15605  *
15606  */
15607  __Pyx_TraceLine(906,1,__PYX_ERR(1, 906, __pyx_L1_error))
15608  __pyx_r = 0;
15609  goto __pyx_L0;
15610 
15611  /* "View.MemoryView":809
15612  *
15613  * @cname('__pyx_memoryview_slice_memviewslice')
15614  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
15615  * __Pyx_memviewslice *dst,
15616  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
15617  */
15618 
15619  /* function exit code */
15620  __pyx_L1_error:;
15621  {
15622  #ifdef WITH_THREAD
15623  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
15624  #endif
15625  __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
15626  #ifdef WITH_THREAD
15627  __Pyx_PyGILState_Release(__pyx_gilstate_save);
15628  #endif
15629  }
15630  __pyx_r = -1;
15631  __pyx_L0:;
15632  __Pyx_TraceReturn(Py_None, 1);
15633  return __pyx_r;
15634 }
15635 
15636 /* "View.MemoryView":912
15637  *
15638  * @cname('__pyx_pybuffer_index')
15639  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
15640  * Py_ssize_t dim) except NULL:
15641  * cdef Py_ssize_t shape, stride, suboffset = -1
15642  */
15643 
15644 static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
15645  Py_ssize_t __pyx_v_shape;
15646  Py_ssize_t __pyx_v_stride;
15647  Py_ssize_t __pyx_v_suboffset;
15648  Py_ssize_t __pyx_v_itemsize;
15649  char *__pyx_v_resultp;
15650  char *__pyx_r;
15651  __Pyx_TraceDeclarations
15652  __Pyx_RefNannyDeclarations
15653  Py_ssize_t __pyx_t_1;
15654  int __pyx_t_2;
15655  PyObject *__pyx_t_3 = NULL;
15656  PyObject *__pyx_t_4 = NULL;
15657  int __pyx_lineno = 0;
15658  const char *__pyx_filename = NULL;
15659  int __pyx_clineno = 0;
15660  __Pyx_RefNannySetupContext("pybuffer_index", 0);
15661  __Pyx_TraceCall("pybuffer_index", __pyx_f[1], 912, 0, __PYX_ERR(1, 912, __pyx_L1_error));
15662 
15663  /* "View.MemoryView":914
15664  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
15665  * Py_ssize_t dim) except NULL:
15666  * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
15667  * cdef Py_ssize_t itemsize = view.itemsize
15668  * cdef char *resultp
15669  */
15670  __Pyx_TraceLine(914,0,__PYX_ERR(1, 914, __pyx_L1_error))
15671  __pyx_v_suboffset = -1L;
15672 
15673  /* "View.MemoryView":915
15674  * Py_ssize_t dim) except NULL:
15675  * cdef Py_ssize_t shape, stride, suboffset = -1
15676  * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
15677  * cdef char *resultp
15678  *
15679  */
15680  __Pyx_TraceLine(915,0,__PYX_ERR(1, 915, __pyx_L1_error))
15681  __pyx_t_1 = __pyx_v_view->itemsize;
15682  __pyx_v_itemsize = __pyx_t_1;
15683 
15684  /* "View.MemoryView":918
15685  * cdef char *resultp
15686  *
15687  * if view.ndim == 0: # <<<<<<<<<<<<<<
15688  * shape = view.len / itemsize
15689  * stride = itemsize
15690  */
15691  __Pyx_TraceLine(918,0,__PYX_ERR(1, 918, __pyx_L1_error))
15692  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
15693  if (__pyx_t_2) {
15694 
15695  /* "View.MemoryView":919
15696  *
15697  * if view.ndim == 0:
15698  * shape = view.len / itemsize # <<<<<<<<<<<<<<
15699  * stride = itemsize
15700  * else:
15701  */
15702  __Pyx_TraceLine(919,0,__PYX_ERR(1, 919, __pyx_L1_error))
15703  if (unlikely(__pyx_v_itemsize == 0)) {
15704  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
15705  __PYX_ERR(1, 919, __pyx_L1_error)
15706  }
15707  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
15708  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
15709  __PYX_ERR(1, 919, __pyx_L1_error)
15710  }
15711  __pyx_v_shape = (__pyx_v_view->len / __pyx_v_itemsize);
15712 
15713  /* "View.MemoryView":920
15714  * if view.ndim == 0:
15715  * shape = view.len / itemsize
15716  * stride = itemsize # <<<<<<<<<<<<<<
15717  * else:
15718  * shape = view.shape[dim]
15719  */
15720  __Pyx_TraceLine(920,0,__PYX_ERR(1, 920, __pyx_L1_error))
15721  __pyx_v_stride = __pyx_v_itemsize;
15722 
15723  /* "View.MemoryView":918
15724  * cdef char *resultp
15725  *
15726  * if view.ndim == 0: # <<<<<<<<<<<<<<
15727  * shape = view.len / itemsize
15728  * stride = itemsize
15729  */
15730  goto __pyx_L3;
15731  }
15732 
15733  /* "View.MemoryView":922
15734  * stride = itemsize
15735  * else:
15736  * shape = view.shape[dim] # <<<<<<<<<<<<<<
15737  * stride = view.strides[dim]
15738  * if view.suboffsets != NULL:
15739  */
15740  __Pyx_TraceLine(922,0,__PYX_ERR(1, 922, __pyx_L1_error))
15741  /*else*/ {
15742  __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
15743 
15744  /* "View.MemoryView":923
15745  * else:
15746  * shape = view.shape[dim]
15747  * stride = view.strides[dim] # <<<<<<<<<<<<<<
15748  * if view.suboffsets != NULL:
15749  * suboffset = view.suboffsets[dim]
15750  */
15751  __Pyx_TraceLine(923,0,__PYX_ERR(1, 923, __pyx_L1_error))
15752  __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
15753 
15754  /* "View.MemoryView":924
15755  * shape = view.shape[dim]
15756  * stride = view.strides[dim]
15757  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
15758  * suboffset = view.suboffsets[dim]
15759  *
15760  */
15761  __Pyx_TraceLine(924,0,__PYX_ERR(1, 924, __pyx_L1_error))
15762  __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
15763  if (__pyx_t_2) {
15764 
15765  /* "View.MemoryView":925
15766  * stride = view.strides[dim]
15767  * if view.suboffsets != NULL:
15768  * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
15769  *
15770  * if index < 0:
15771  */
15772  __Pyx_TraceLine(925,0,__PYX_ERR(1, 925, __pyx_L1_error))
15773  __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
15774 
15775  /* "View.MemoryView":924
15776  * shape = view.shape[dim]
15777  * stride = view.strides[dim]
15778  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
15779  * suboffset = view.suboffsets[dim]
15780  *
15781  */
15782  }
15783  }
15784  __pyx_L3:;
15785 
15786  /* "View.MemoryView":927
15787  * suboffset = view.suboffsets[dim]
15788  *
15789  * if index < 0: # <<<<<<<<<<<<<<
15790  * index += view.shape[dim]
15791  * if index < 0:
15792  */
15793  __Pyx_TraceLine(927,0,__PYX_ERR(1, 927, __pyx_L1_error))
15794  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
15795  if (__pyx_t_2) {
15796 
15797  /* "View.MemoryView":928
15798  *
15799  * if index < 0:
15800  * index += view.shape[dim] # <<<<<<<<<<<<<<
15801  * if index < 0:
15802  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15803  */
15804  __Pyx_TraceLine(928,0,__PYX_ERR(1, 928, __pyx_L1_error))
15805  __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
15806 
15807  /* "View.MemoryView":929
15808  * if index < 0:
15809  * index += view.shape[dim]
15810  * if index < 0: # <<<<<<<<<<<<<<
15811  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15812  *
15813  */
15814  __Pyx_TraceLine(929,0,__PYX_ERR(1, 929, __pyx_L1_error))
15815  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
15816  if (unlikely(__pyx_t_2)) {
15817 
15818  /* "View.MemoryView":930
15819  * index += view.shape[dim]
15820  * if index < 0:
15821  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
15822  *
15823  * if index >= shape:
15824  */
15825  __Pyx_TraceLine(930,0,__PYX_ERR(1, 930, __pyx_L1_error))
15826  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 930, __pyx_L1_error)
15827  __Pyx_GOTREF(__pyx_t_3);
15828  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 930, __pyx_L1_error)
15829  __Pyx_GOTREF(__pyx_t_4);
15830  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15831  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 930, __pyx_L1_error)
15832  __Pyx_GOTREF(__pyx_t_3);
15833  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15834  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
15835  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15836  __PYX_ERR(1, 930, __pyx_L1_error)
15837 
15838  /* "View.MemoryView":929
15839  * if index < 0:
15840  * index += view.shape[dim]
15841  * if index < 0: # <<<<<<<<<<<<<<
15842  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15843  *
15844  */
15845  }
15846 
15847  /* "View.MemoryView":927
15848  * suboffset = view.suboffsets[dim]
15849  *
15850  * if index < 0: # <<<<<<<<<<<<<<
15851  * index += view.shape[dim]
15852  * if index < 0:
15853  */
15854  }
15855 
15856  /* "View.MemoryView":932
15857  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15858  *
15859  * if index >= shape: # <<<<<<<<<<<<<<
15860  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15861  *
15862  */
15863  __Pyx_TraceLine(932,0,__PYX_ERR(1, 932, __pyx_L1_error))
15864  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
15865  if (unlikely(__pyx_t_2)) {
15866 
15867  /* "View.MemoryView":933
15868  *
15869  * if index >= shape:
15870  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
15871  *
15872  * resultp = bufp + index * stride
15873  */
15874  __Pyx_TraceLine(933,0,__PYX_ERR(1, 933, __pyx_L1_error))
15875  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 933, __pyx_L1_error)
15876  __Pyx_GOTREF(__pyx_t_3);
15877  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 933, __pyx_L1_error)
15878  __Pyx_GOTREF(__pyx_t_4);
15879  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15880  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 933, __pyx_L1_error)
15881  __Pyx_GOTREF(__pyx_t_3);
15882  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15883  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
15884  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15885  __PYX_ERR(1, 933, __pyx_L1_error)
15886 
15887  /* "View.MemoryView":932
15888  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15889  *
15890  * if index >= shape: # <<<<<<<<<<<<<<
15891  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15892  *
15893  */
15894  }
15895 
15896  /* "View.MemoryView":935
15897  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
15898  *
15899  * resultp = bufp + index * stride # <<<<<<<<<<<<<<
15900  * if suboffset >= 0:
15901  * resultp = (<char **> resultp)[0] + suboffset
15902  */
15903  __Pyx_TraceLine(935,0,__PYX_ERR(1, 935, __pyx_L1_error))
15904  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
15905 
15906  /* "View.MemoryView":936
15907  *
15908  * resultp = bufp + index * stride
15909  * if suboffset >= 0: # <<<<<<<<<<<<<<
15910  * resultp = (<char **> resultp)[0] + suboffset
15911  *
15912  */
15913  __Pyx_TraceLine(936,0,__PYX_ERR(1, 936, __pyx_L1_error))
15914  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
15915  if (__pyx_t_2) {
15916 
15917  /* "View.MemoryView":937
15918  * resultp = bufp + index * stride
15919  * if suboffset >= 0:
15920  * resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
15921  *
15922  * return resultp
15923  */
15924  __Pyx_TraceLine(937,0,__PYX_ERR(1, 937, __pyx_L1_error))
15925  __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
15926 
15927  /* "View.MemoryView":936
15928  *
15929  * resultp = bufp + index * stride
15930  * if suboffset >= 0: # <<<<<<<<<<<<<<
15931  * resultp = (<char **> resultp)[0] + suboffset
15932  *
15933  */
15934  }
15935 
15936  /* "View.MemoryView":939
15937  * resultp = (<char **> resultp)[0] + suboffset
15938  *
15939  * return resultp # <<<<<<<<<<<<<<
15940  *
15941  *
15942  */
15943  __Pyx_TraceLine(939,0,__PYX_ERR(1, 939, __pyx_L1_error))
15944  __pyx_r = __pyx_v_resultp;
15945  goto __pyx_L0;
15946 
15947  /* "View.MemoryView":912
15948  *
15949  * @cname('__pyx_pybuffer_index')
15950  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
15951  * Py_ssize_t dim) except NULL:
15952  * cdef Py_ssize_t shape, stride, suboffset = -1
15953  */
15954 
15955  /* function exit code */
15956  __pyx_L1_error:;
15957  __Pyx_XDECREF(__pyx_t_3);
15958  __Pyx_XDECREF(__pyx_t_4);
15959  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
15960  __pyx_r = NULL;
15961  __pyx_L0:;
15962  __Pyx_TraceReturn(Py_None, 0);
15963  __Pyx_RefNannyFinishContext();
15964  return __pyx_r;
15965 }
15966 
15967 /* "View.MemoryView":945
15968  *
15969  * @cname('__pyx_memslice_transpose')
15970  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
15971  * cdef int ndim = memslice.memview.view.ndim
15972  *
15973  */
15974 
15975 static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
15976  int __pyx_v_ndim;
15977  Py_ssize_t *__pyx_v_shape;
15978  Py_ssize_t *__pyx_v_strides;
15979  int __pyx_v_i;
15980  int __pyx_v_j;
15981  int __pyx_r;
15982  __Pyx_TraceDeclarations
15983  int __pyx_t_1;
15984  Py_ssize_t *__pyx_t_2;
15985  long __pyx_t_3;
15986  long __pyx_t_4;
15987  Py_ssize_t __pyx_t_5;
15988  Py_ssize_t __pyx_t_6;
15989  int __pyx_t_7;
15990  int __pyx_t_8;
15991  int __pyx_t_9;
15992  int __pyx_lineno = 0;
15993  const char *__pyx_filename = NULL;
15994  int __pyx_clineno = 0;
15995  __Pyx_TraceCall("transpose_memslice", __pyx_f[1], 945, 1, __PYX_ERR(1, 945, __pyx_L1_error));
15996 
15997  /* "View.MemoryView":946
15998  * @cname('__pyx_memslice_transpose')
15999  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
16000  * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
16001  *
16002  * cdef Py_ssize_t *shape = memslice.shape
16003  */
16004  __Pyx_TraceLine(946,1,__PYX_ERR(1, 946, __pyx_L1_error))
16005  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
16006  __pyx_v_ndim = __pyx_t_1;
16007 
16008  /* "View.MemoryView":948
16009  * cdef int ndim = memslice.memview.view.ndim
16010  *
16011  * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
16012  * cdef Py_ssize_t *strides = memslice.strides
16013  *
16014  */
16015  __Pyx_TraceLine(948,1,__PYX_ERR(1, 948, __pyx_L1_error))
16016  __pyx_t_2 = __pyx_v_memslice->shape;
16017  __pyx_v_shape = __pyx_t_2;
16018 
16019  /* "View.MemoryView":949
16020  *
16021  * cdef Py_ssize_t *shape = memslice.shape
16022  * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
16023  *
16024  *
16025  */
16026  __Pyx_TraceLine(949,1,__PYX_ERR(1, 949, __pyx_L1_error))
16027  __pyx_t_2 = __pyx_v_memslice->strides;
16028  __pyx_v_strides = __pyx_t_2;
16029 
16030  /* "View.MemoryView":953
16031  *
16032  * cdef int i, j
16033  * for i in range(ndim / 2): # <<<<<<<<<<<<<<
16034  * j = ndim - 1 - i
16035  * strides[i], strides[j] = strides[j], strides[i]
16036  */
16037  __Pyx_TraceLine(953,1,__PYX_ERR(1, 953, __pyx_L1_error))
16038  __pyx_t_3 = (__pyx_v_ndim / 2);
16039  __pyx_t_4 = __pyx_t_3;
16040  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
16041  __pyx_v_i = __pyx_t_1;
16042 
16043  /* "View.MemoryView":954
16044  * cdef int i, j
16045  * for i in range(ndim / 2):
16046  * j = ndim - 1 - i # <<<<<<<<<<<<<<
16047  * strides[i], strides[j] = strides[j], strides[i]
16048  * shape[i], shape[j] = shape[j], shape[i]
16049  */
16050  __Pyx_TraceLine(954,1,__PYX_ERR(1, 954, __pyx_L1_error))
16051  __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
16052 
16053  /* "View.MemoryView":955
16054  * for i in range(ndim / 2):
16055  * j = ndim - 1 - i
16056  * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
16057  * shape[i], shape[j] = shape[j], shape[i]
16058  *
16059  */
16060  __Pyx_TraceLine(955,1,__PYX_ERR(1, 955, __pyx_L1_error))
16061  __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
16062  __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
16063  (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
16064  (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
16065 
16066  /* "View.MemoryView":956
16067  * j = ndim - 1 - i
16068  * strides[i], strides[j] = strides[j], strides[i]
16069  * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
16070  *
16071  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
16072  */
16073  __Pyx_TraceLine(956,1,__PYX_ERR(1, 956, __pyx_L1_error))
16074  __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
16075  __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
16076  (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
16077  (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
16078 
16079  /* "View.MemoryView":958
16080  * shape[i], shape[j] = shape[j], shape[i]
16081  *
16082  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
16083  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
16084  *
16085  */
16086  __Pyx_TraceLine(958,1,__PYX_ERR(1, 958, __pyx_L1_error))
16087  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
16088  if (!__pyx_t_8) {
16089  } else {
16090  __pyx_t_7 = __pyx_t_8;
16091  goto __pyx_L6_bool_binop_done;
16092  }
16093  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
16094  __pyx_t_7 = __pyx_t_8;
16095  __pyx_L6_bool_binop_done:;
16096  if (__pyx_t_7) {
16097 
16098  /* "View.MemoryView":959
16099  *
16100  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
16101  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
16102  *
16103  * return 1
16104  */
16105  __Pyx_TraceLine(959,1,__PYX_ERR(1, 959, __pyx_L1_error))
16106  __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 959, __pyx_L1_error)
16107 
16108  /* "View.MemoryView":958
16109  * shape[i], shape[j] = shape[j], shape[i]
16110  *
16111  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
16112  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
16113  *
16114  */
16115  }
16116  }
16117 
16118  /* "View.MemoryView":961
16119  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
16120  *
16121  * return 1 # <<<<<<<<<<<<<<
16122  *
16123  *
16124  */
16125  __Pyx_TraceLine(961,1,__PYX_ERR(1, 961, __pyx_L1_error))
16126  __pyx_r = 1;
16127  goto __pyx_L0;
16128 
16129  /* "View.MemoryView":945
16130  *
16131  * @cname('__pyx_memslice_transpose')
16132  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
16133  * cdef int ndim = memslice.memview.view.ndim
16134  *
16135  */
16136 
16137  /* function exit code */
16138  __pyx_L1_error:;
16139  {
16140  #ifdef WITH_THREAD
16141  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
16142  #endif
16143  __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
16144  #ifdef WITH_THREAD
16145  __Pyx_PyGILState_Release(__pyx_gilstate_save);
16146  #endif
16147  }
16148  __pyx_r = 0;
16149  __pyx_L0:;
16150  __Pyx_TraceReturn(Py_None, 1);
16151  return __pyx_r;
16152 }
16153 
16154 /* "View.MemoryView":978
16155  * cdef int (*to_dtype_func)(char *, object) except 0
16156  *
16157  * def __dealloc__(self): # <<<<<<<<<<<<<<
16158  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
16159  *
16160  */
16161 
16162 /* Python wrapper */
16163 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
16164 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
16165  __Pyx_RefNannyDeclarations
16166  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
16167  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
16168 
16169  /* function exit code */
16170  __Pyx_RefNannyFinishContext();
16171 }
16172 
16173 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
16174  __Pyx_TraceDeclarations
16175  __Pyx_RefNannyDeclarations
16176  int __pyx_lineno = 0;
16177  const char *__pyx_filename = NULL;
16178  int __pyx_clineno = 0;
16179  __Pyx_RefNannySetupContext("__dealloc__", 0);
16180  __Pyx_TraceCall("__dealloc__", __pyx_f[1], 978, 0, __PYX_ERR(1, 978, __pyx_L1_error));
16181 
16182  /* "View.MemoryView":979
16183  *
16184  * def __dealloc__(self):
16185  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
16186  *
16187  * cdef convert_item_to_object(self, char *itemp):
16188  */
16189  __Pyx_TraceLine(979,0,__PYX_ERR(1, 979, __pyx_L1_error))
16190  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
16191 
16192  /* "View.MemoryView":978
16193  * cdef int (*to_dtype_func)(char *, object) except 0
16194  *
16195  * def __dealloc__(self): # <<<<<<<<<<<<<<
16196  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
16197  *
16198  */
16199 
16200  /* function exit code */
16201  goto __pyx_L0;
16202  __pyx_L1_error:;
16203  __Pyx_WriteUnraisable("View.MemoryView._memoryviewslice.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
16204  __pyx_L0:;
16205  __Pyx_TraceReturn(Py_None, 0);
16206  __Pyx_RefNannyFinishContext();
16207 }
16208 
16209 /* "View.MemoryView":981
16210  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
16211  *
16212  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
16213  * if self.to_object_func != NULL:
16214  * return self.to_object_func(itemp)
16215  */
16216 
16217 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
16218  PyObject *__pyx_r = NULL;
16219  __Pyx_TraceDeclarations
16220  __Pyx_RefNannyDeclarations
16221  int __pyx_t_1;
16222  PyObject *__pyx_t_2 = NULL;
16223  int __pyx_lineno = 0;
16224  const char *__pyx_filename = NULL;
16225  int __pyx_clineno = 0;
16226  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
16227  __Pyx_TraceCall("convert_item_to_object", __pyx_f[1], 981, 0, __PYX_ERR(1, 981, __pyx_L1_error));
16228 
16229  /* "View.MemoryView":982
16230  *
16231  * cdef convert_item_to_object(self, char *itemp):
16232  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
16233  * return self.to_object_func(itemp)
16234  * else:
16235  */
16236  __Pyx_TraceLine(982,0,__PYX_ERR(1, 982, __pyx_L1_error))
16237  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
16238  if (__pyx_t_1) {
16239 
16240  /* "View.MemoryView":983
16241  * cdef convert_item_to_object(self, char *itemp):
16242  * if self.to_object_func != NULL:
16243  * return self.to_object_func(itemp) # <<<<<<<<<<<<<<
16244  * else:
16245  * return memoryview.convert_item_to_object(self, itemp)
16246  */
16247  __Pyx_TraceLine(983,0,__PYX_ERR(1, 983, __pyx_L1_error))
16248  __Pyx_XDECREF(__pyx_r);
16249  __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 983, __pyx_L1_error)
16250  __Pyx_GOTREF(__pyx_t_2);
16251  __pyx_r = __pyx_t_2;
16252  __pyx_t_2 = 0;
16253  goto __pyx_L0;
16254 
16255  /* "View.MemoryView":982
16256  *
16257  * cdef convert_item_to_object(self, char *itemp):
16258  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
16259  * return self.to_object_func(itemp)
16260  * else:
16261  */
16262  }
16263 
16264  /* "View.MemoryView":985
16265  * return self.to_object_func(itemp)
16266  * else:
16267  * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
16268  *
16269  * cdef assign_item_from_object(self, char *itemp, object value):
16270  */
16271  __Pyx_TraceLine(985,0,__PYX_ERR(1, 985, __pyx_L1_error))
16272  /*else*/ {
16273  __Pyx_XDECREF(__pyx_r);
16274  __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 985, __pyx_L1_error)
16275  __Pyx_GOTREF(__pyx_t_2);
16276  __pyx_r = __pyx_t_2;
16277  __pyx_t_2 = 0;
16278  goto __pyx_L0;
16279  }
16280 
16281  /* "View.MemoryView":981
16282  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
16283  *
16284  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
16285  * if self.to_object_func != NULL:
16286  * return self.to_object_func(itemp)
16287  */
16288 
16289  /* function exit code */
16290  __pyx_L1_error:;
16291  __Pyx_XDECREF(__pyx_t_2);
16292  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
16293  __pyx_r = 0;
16294  __pyx_L0:;
16295  __Pyx_XGIVEREF(__pyx_r);
16296  __Pyx_TraceReturn(__pyx_r, 0);
16297  __Pyx_RefNannyFinishContext();
16298  return __pyx_r;
16299 }
16300 
16301 /* "View.MemoryView":987
16302  * return memoryview.convert_item_to_object(self, itemp)
16303  *
16304  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
16305  * if self.to_dtype_func != NULL:
16306  * self.to_dtype_func(itemp, value)
16307  */
16308 
16309 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
16310  PyObject *__pyx_r = NULL;
16311  __Pyx_TraceDeclarations
16312  __Pyx_RefNannyDeclarations
16313  int __pyx_t_1;
16314  int __pyx_t_2;
16315  PyObject *__pyx_t_3 = NULL;
16316  int __pyx_lineno = 0;
16317  const char *__pyx_filename = NULL;
16318  int __pyx_clineno = 0;
16319  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
16320  __Pyx_TraceCall("assign_item_from_object", __pyx_f[1], 987, 0, __PYX_ERR(1, 987, __pyx_L1_error));
16321 
16322  /* "View.MemoryView":988
16323  *
16324  * cdef assign_item_from_object(self, char *itemp, object value):
16325  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
16326  * self.to_dtype_func(itemp, value)
16327  * else:
16328  */
16329  __Pyx_TraceLine(988,0,__PYX_ERR(1, 988, __pyx_L1_error))
16330  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
16331  if (__pyx_t_1) {
16332 
16333  /* "View.MemoryView":989
16334  * cdef assign_item_from_object(self, char *itemp, object value):
16335  * if self.to_dtype_func != NULL:
16336  * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
16337  * else:
16338  * memoryview.assign_item_from_object(self, itemp, value)
16339  */
16340  __Pyx_TraceLine(989,0,__PYX_ERR(1, 989, __pyx_L1_error))
16341  __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 989, __pyx_L1_error)
16342 
16343  /* "View.MemoryView":988
16344  *
16345  * cdef assign_item_from_object(self, char *itemp, object value):
16346  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
16347  * self.to_dtype_func(itemp, value)
16348  * else:
16349  */
16350  goto __pyx_L3;
16351  }
16352 
16353  /* "View.MemoryView":991
16354  * self.to_dtype_func(itemp, value)
16355  * else:
16356  * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
16357  *
16358  * @property
16359  */
16360  __Pyx_TraceLine(991,0,__PYX_ERR(1, 991, __pyx_L1_error))
16361  /*else*/ {
16362  __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 991, __pyx_L1_error)
16363  __Pyx_GOTREF(__pyx_t_3);
16364  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16365  }
16366  __pyx_L3:;
16367 
16368  /* "View.MemoryView":987
16369  * return memoryview.convert_item_to_object(self, itemp)
16370  *
16371  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
16372  * if self.to_dtype_func != NULL:
16373  * self.to_dtype_func(itemp, value)
16374  */
16375 
16376  /* function exit code */
16377  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16378  goto __pyx_L0;
16379  __pyx_L1_error:;
16380  __Pyx_XDECREF(__pyx_t_3);
16381  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
16382  __pyx_r = 0;
16383  __pyx_L0:;
16384  __Pyx_XGIVEREF(__pyx_r);
16385  __Pyx_TraceReturn(__pyx_r, 0);
16386  __Pyx_RefNannyFinishContext();
16387  return __pyx_r;
16388 }
16389 
16390 /* "View.MemoryView":994
16391  *
16392  * @property
16393  * def base(self): # <<<<<<<<<<<<<<
16394  * return self.from_object
16395  *
16396  */
16397 
16398 /* Python wrapper */
16399 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
16400 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
16401  PyObject *__pyx_r = 0;
16402  __Pyx_RefNannyDeclarations
16403  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
16404  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
16405 
16406  /* function exit code */
16407  __Pyx_RefNannyFinishContext();
16408  return __pyx_r;
16409 }
16410 
16411 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
16412  PyObject *__pyx_r = NULL;
16413  __Pyx_TraceDeclarations
16414  __Pyx_RefNannyDeclarations
16415  int __pyx_lineno = 0;
16416  const char *__pyx_filename = NULL;
16417  int __pyx_clineno = 0;
16418  __Pyx_RefNannySetupContext("__get__", 0);
16419  __Pyx_TraceCall("__get__", __pyx_f[1], 994, 0, __PYX_ERR(1, 994, __pyx_L1_error));
16420 
16421  /* "View.MemoryView":995
16422  * @property
16423  * def base(self):
16424  * return self.from_object # <<<<<<<<<<<<<<
16425  *
16426  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
16427  */
16428  __Pyx_TraceLine(995,0,__PYX_ERR(1, 995, __pyx_L1_error))
16429  __Pyx_XDECREF(__pyx_r);
16430  __Pyx_INCREF(__pyx_v_self->from_object);
16431  __pyx_r = __pyx_v_self->from_object;
16432  goto __pyx_L0;
16433 
16434  /* "View.MemoryView":994
16435  *
16436  * @property
16437  * def base(self): # <<<<<<<<<<<<<<
16438  * return self.from_object
16439  *
16440  */
16441 
16442  /* function exit code */
16443  __pyx_L1_error:;
16444  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16445  __pyx_r = NULL;
16446  __pyx_L0:;
16447  __Pyx_XGIVEREF(__pyx_r);
16448  __Pyx_TraceReturn(__pyx_r, 0);
16449  __Pyx_RefNannyFinishContext();
16450  return __pyx_r;
16451 }
16452 
16453 /* "(tree fragment)":1
16454  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
16455  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16456  * def __setstate_cython__(self, __pyx_state):
16457  */
16458 
16459 /* Python wrapper */
16460 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
16461 static PyMethodDef __pyx_mdef___pyx_memoryviewslice_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0};
16462 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
16463  PyObject *__pyx_r = 0;
16464  __Pyx_RefNannyDeclarations
16465  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
16466  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
16467 
16468  /* function exit code */
16469  __Pyx_RefNannyFinishContext();
16470  return __pyx_r;
16471 }
16472 
16473 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
16474  PyObject *__pyx_r = NULL;
16475  __Pyx_TraceDeclarations
16476  __Pyx_RefNannyDeclarations
16477  PyObject *__pyx_t_1 = NULL;
16478  int __pyx_lineno = 0;
16479  const char *__pyx_filename = NULL;
16480  int __pyx_clineno = 0;
16481  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
16482  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
16483 
16484  /* "(tree fragment)":2
16485  * def __reduce_cython__(self):
16486  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
16487  * def __setstate_cython__(self, __pyx_state):
16488  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16489  */
16490  __Pyx_TraceLine(2,0,__PYX_ERR(1, 2, __pyx_L1_error))
16491  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
16492  __Pyx_GOTREF(__pyx_t_1);
16493  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
16494  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16495  __PYX_ERR(1, 2, __pyx_L1_error)
16496 
16497  /* "(tree fragment)":1
16498  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
16499  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16500  * def __setstate_cython__(self, __pyx_state):
16501  */
16502 
16503  /* function exit code */
16504  __pyx_L1_error:;
16505  __Pyx_XDECREF(__pyx_t_1);
16506  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16507  __pyx_r = NULL;
16508  __Pyx_XGIVEREF(__pyx_r);
16509  __Pyx_TraceReturn(__pyx_r, 0);
16510  __Pyx_RefNannyFinishContext();
16511  return __pyx_r;
16512 }
16513 
16514 /* "(tree fragment)":3
16515  * def __reduce_cython__(self):
16516  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16517  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
16518  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16519  */
16520 
16521 /* Python wrapper */
16522 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
16523 static PyMethodDef __pyx_mdef___pyx_memoryviewslice_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0};
16524 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
16525  PyObject *__pyx_r = 0;
16526  __Pyx_RefNannyDeclarations
16527  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
16528  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
16529 
16530  /* function exit code */
16531  __Pyx_RefNannyFinishContext();
16532  return __pyx_r;
16533 }
16534 
16535 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
16536  PyObject *__pyx_r = NULL;
16537  __Pyx_TraceDeclarations
16538  __Pyx_RefNannyDeclarations
16539  PyObject *__pyx_t_1 = NULL;
16540  int __pyx_lineno = 0;
16541  const char *__pyx_filename = NULL;
16542  int __pyx_clineno = 0;
16543  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
16544  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
16545 
16546  /* "(tree fragment)":4
16547  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16548  * def __setstate_cython__(self, __pyx_state):
16549  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
16550  */
16551  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
16552  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
16553  __Pyx_GOTREF(__pyx_t_1);
16554  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
16555  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16556  __PYX_ERR(1, 4, __pyx_L1_error)
16557 
16558  /* "(tree fragment)":3
16559  * def __reduce_cython__(self):
16560  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16561  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
16562  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
16563  */
16564 
16565  /* function exit code */
16566  __pyx_L1_error:;
16567  __Pyx_XDECREF(__pyx_t_1);
16568  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16569  __pyx_r = NULL;
16570  __Pyx_XGIVEREF(__pyx_r);
16571  __Pyx_TraceReturn(__pyx_r, 0);
16572  __Pyx_RefNannyFinishContext();
16573  return __pyx_r;
16574 }
16575 
16576 /* "View.MemoryView":1001
16577  *
16578  * @cname('__pyx_memoryview_fromslice')
16579  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
16580  * int ndim,
16581  * object (*to_object_func)(char *),
16582  */
16583 
16584 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
16585  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
16586  Py_ssize_t __pyx_v_suboffset;
16587  PyObject *__pyx_v_length = NULL;
16588  PyObject *__pyx_r = NULL;
16589  __Pyx_TraceDeclarations
16590  __Pyx_RefNannyDeclarations
16591  int __pyx_t_1;
16592  PyObject *__pyx_t_2 = NULL;
16593  PyObject *__pyx_t_3 = NULL;
16594  __Pyx_TypeInfo *__pyx_t_4;
16595  Py_buffer __pyx_t_5;
16596  Py_ssize_t *__pyx_t_6;
16597  Py_ssize_t *__pyx_t_7;
16598  Py_ssize_t *__pyx_t_8;
16599  Py_ssize_t __pyx_t_9;
16600  int __pyx_lineno = 0;
16601  const char *__pyx_filename = NULL;
16602  int __pyx_clineno = 0;
16603  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
16604  __Pyx_TraceCall("memoryview_fromslice", __pyx_f[1], 1001, 0, __PYX_ERR(1, 1001, __pyx_L1_error));
16605 
16606  /* "View.MemoryView":1009
16607  * cdef _memoryviewslice result
16608  *
16609  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
16610  * return None
16611  *
16612  */
16613  __Pyx_TraceLine(1009,0,__PYX_ERR(1, 1009, __pyx_L1_error))
16614  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
16615  if (__pyx_t_1) {
16616 
16617  /* "View.MemoryView":1010
16618  *
16619  * if <PyObject *> memviewslice.memview == Py_None:
16620  * return None # <<<<<<<<<<<<<<
16621  *
16622  *
16623  */
16624  __Pyx_TraceLine(1010,0,__PYX_ERR(1, 1010, __pyx_L1_error))
16625  __Pyx_XDECREF(__pyx_r);
16626  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16627  goto __pyx_L0;
16628 
16629  /* "View.MemoryView":1009
16630  * cdef _memoryviewslice result
16631  *
16632  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
16633  * return None
16634  *
16635  */
16636  }
16637 
16638  /* "View.MemoryView":1015
16639  *
16640  *
16641  * result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<<
16642  *
16643  * result.from_slice = memviewslice
16644  */
16645  __Pyx_TraceLine(1015,0,__PYX_ERR(1, 1015, __pyx_L1_error))
16646  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error)
16647  __Pyx_GOTREF(__pyx_t_2);
16648  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1015, __pyx_L1_error)
16649  __Pyx_GOTREF(__pyx_t_3);
16650  __Pyx_INCREF(Py_None);
16651  __Pyx_GIVEREF(Py_None);
16652  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
16653  __Pyx_INCREF(__pyx_int_0);
16654  __Pyx_GIVEREF(__pyx_int_0);
16655  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
16656  __Pyx_GIVEREF(__pyx_t_2);
16657  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
16658  __pyx_t_2 = 0;
16659  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1015, __pyx_L1_error)
16660  __Pyx_GOTREF(__pyx_t_2);
16661  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16662  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
16663  __pyx_t_2 = 0;
16664 
16665  /* "View.MemoryView":1017
16666  * result = _memoryviewslice(None, 0, dtype_is_object)
16667  *
16668  * result.from_slice = memviewslice # <<<<<<<<<<<<<<
16669  * __PYX_INC_MEMVIEW(&memviewslice, 1)
16670  *
16671  */
16672  __Pyx_TraceLine(1017,0,__PYX_ERR(1, 1017, __pyx_L1_error))
16673  __pyx_v_result->from_slice = __pyx_v_memviewslice;
16674 
16675  /* "View.MemoryView":1018
16676  *
16677  * result.from_slice = memviewslice
16678  * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
16679  *
16680  * result.from_object = (<memoryview> memviewslice.memview).base
16681  */
16682  __Pyx_TraceLine(1018,0,__PYX_ERR(1, 1018, __pyx_L1_error))
16683  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
16684 
16685  /* "View.MemoryView":1020
16686  * __PYX_INC_MEMVIEW(&memviewslice, 1)
16687  *
16688  * result.from_object = (<memoryview> memviewslice.memview).base # <<<<<<<<<<<<<<
16689  * result.typeinfo = memviewslice.memview.typeinfo
16690  *
16691  */
16692  __Pyx_TraceLine(1020,0,__PYX_ERR(1, 1020, __pyx_L1_error))
16693  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1020, __pyx_L1_error)
16694  __Pyx_GOTREF(__pyx_t_2);
16695  __Pyx_GIVEREF(__pyx_t_2);
16696  __Pyx_GOTREF(__pyx_v_result->from_object);
16697  __Pyx_DECREF(__pyx_v_result->from_object);
16698  __pyx_v_result->from_object = __pyx_t_2;
16699  __pyx_t_2 = 0;
16700 
16701  /* "View.MemoryView":1021
16702  *
16703  * result.from_object = (<memoryview> memviewslice.memview).base
16704  * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
16705  *
16706  * result.view = memviewslice.memview.view
16707  */
16708  __Pyx_TraceLine(1021,0,__PYX_ERR(1, 1021, __pyx_L1_error))
16709  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
16710  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
16711 
16712  /* "View.MemoryView":1023
16713  * result.typeinfo = memviewslice.memview.typeinfo
16714  *
16715  * result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
16716  * result.view.buf = <void *> memviewslice.data
16717  * result.view.ndim = ndim
16718  */
16719  __Pyx_TraceLine(1023,0,__PYX_ERR(1, 1023, __pyx_L1_error))
16720  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
16721  __pyx_v_result->__pyx_base.view = __pyx_t_5;
16722 
16723  /* "View.MemoryView":1024
16724  *
16725  * result.view = memviewslice.memview.view
16726  * result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
16727  * result.view.ndim = ndim
16728  * (<__pyx_buffer *> &result.view).obj = Py_None
16729  */
16730  __Pyx_TraceLine(1024,0,__PYX_ERR(1, 1024, __pyx_L1_error))
16731  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
16732 
16733  /* "View.MemoryView":1025
16734  * result.view = memviewslice.memview.view
16735  * result.view.buf = <void *> memviewslice.data
16736  * result.view.ndim = ndim # <<<<<<<<<<<<<<
16737  * (<__pyx_buffer *> &result.view).obj = Py_None
16738  * Py_INCREF(Py_None)
16739  */
16740  __Pyx_TraceLine(1025,0,__PYX_ERR(1, 1025, __pyx_L1_error))
16741  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
16742 
16743  /* "View.MemoryView":1026
16744  * result.view.buf = <void *> memviewslice.data
16745  * result.view.ndim = ndim
16746  * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
16747  * Py_INCREF(Py_None)
16748  *
16749  */
16750  __Pyx_TraceLine(1026,0,__PYX_ERR(1, 1026, __pyx_L1_error))
16751  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
16752 
16753  /* "View.MemoryView":1027
16754  * result.view.ndim = ndim
16755  * (<__pyx_buffer *> &result.view).obj = Py_None
16756  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
16757  *
16758  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
16759  */
16760  __Pyx_TraceLine(1027,0,__PYX_ERR(1, 1027, __pyx_L1_error))
16761  Py_INCREF(Py_None);
16762 
16763  /* "View.MemoryView":1029
16764  * Py_INCREF(Py_None)
16765  *
16766  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
16767  * result.flags = PyBUF_RECORDS
16768  * else:
16769  */
16770  __Pyx_TraceLine(1029,0,__PYX_ERR(1, 1029, __pyx_L1_error))
16771  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
16772  if (__pyx_t_1) {
16773 
16774  /* "View.MemoryView":1030
16775  *
16776  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
16777  * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
16778  * else:
16779  * result.flags = PyBUF_RECORDS_RO
16780  */
16781  __Pyx_TraceLine(1030,0,__PYX_ERR(1, 1030, __pyx_L1_error))
16782  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
16783 
16784  /* "View.MemoryView":1029
16785  * Py_INCREF(Py_None)
16786  *
16787  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
16788  * result.flags = PyBUF_RECORDS
16789  * else:
16790  */
16791  goto __pyx_L4;
16792  }
16793 
16794  /* "View.MemoryView":1032
16795  * result.flags = PyBUF_RECORDS
16796  * else:
16797  * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
16798  *
16799  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
16800  */
16801  __Pyx_TraceLine(1032,0,__PYX_ERR(1, 1032, __pyx_L1_error))
16802  /*else*/ {
16803  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
16804  }
16805  __pyx_L4:;
16806 
16807  /* "View.MemoryView":1034
16808  * result.flags = PyBUF_RECORDS_RO
16809  *
16810  * result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
16811  * result.view.strides = <Py_ssize_t *> result.from_slice.strides
16812  *
16813  */
16814  __Pyx_TraceLine(1034,0,__PYX_ERR(1, 1034, __pyx_L1_error))
16815  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
16816 
16817  /* "View.MemoryView":1035
16818  *
16819  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
16820  * result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
16821  *
16822  *
16823  */
16824  __Pyx_TraceLine(1035,0,__PYX_ERR(1, 1035, __pyx_L1_error))
16825  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
16826 
16827  /* "View.MemoryView":1038
16828  *
16829  *
16830  * result.view.suboffsets = NULL # <<<<<<<<<<<<<<
16831  * for suboffset in result.from_slice.suboffsets[:ndim]:
16832  * if suboffset >= 0:
16833  */
16834  __Pyx_TraceLine(1038,0,__PYX_ERR(1, 1038, __pyx_L1_error))
16835  __pyx_v_result->__pyx_base.view.suboffsets = NULL;
16836 
16837  /* "View.MemoryView":1039
16838  *
16839  * result.view.suboffsets = NULL
16840  * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
16841  * if suboffset >= 0:
16842  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16843  */
16844  __Pyx_TraceLine(1039,0,__PYX_ERR(1, 1039, __pyx_L1_error))
16845  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
16846  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
16847  __pyx_t_6 = __pyx_t_8;
16848  __pyx_v_suboffset = (__pyx_t_6[0]);
16849 
16850  /* "View.MemoryView":1040
16851  * result.view.suboffsets = NULL
16852  * for suboffset in result.from_slice.suboffsets[:ndim]:
16853  * if suboffset >= 0: # <<<<<<<<<<<<<<
16854  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16855  * break
16856  */
16857  __Pyx_TraceLine(1040,0,__PYX_ERR(1, 1040, __pyx_L1_error))
16858  __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
16859  if (__pyx_t_1) {
16860 
16861  /* "View.MemoryView":1041
16862  * for suboffset in result.from_slice.suboffsets[:ndim]:
16863  * if suboffset >= 0:
16864  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
16865  * break
16866  *
16867  */
16868  __Pyx_TraceLine(1041,0,__PYX_ERR(1, 1041, __pyx_L1_error))
16869  __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
16870 
16871  /* "View.MemoryView":1042
16872  * if suboffset >= 0:
16873  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16874  * break # <<<<<<<<<<<<<<
16875  *
16876  * result.view.len = result.view.itemsize
16877  */
16878  __Pyx_TraceLine(1042,0,__PYX_ERR(1, 1042, __pyx_L1_error))
16879  goto __pyx_L6_break;
16880 
16881  /* "View.MemoryView":1040
16882  * result.view.suboffsets = NULL
16883  * for suboffset in result.from_slice.suboffsets[:ndim]:
16884  * if suboffset >= 0: # <<<<<<<<<<<<<<
16885  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
16886  * break
16887  */
16888  }
16889  }
16890  __pyx_L6_break:;
16891 
16892  /* "View.MemoryView":1044
16893  * break
16894  *
16895  * result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
16896  * for length in result.view.shape[:ndim]:
16897  * result.view.len *= length
16898  */
16899  __Pyx_TraceLine(1044,0,__PYX_ERR(1, 1044, __pyx_L1_error))
16900  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
16901  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
16902 
16903  /* "View.MemoryView":1045
16904  *
16905  * result.view.len = result.view.itemsize
16906  * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
16907  * result.view.len *= length
16908  *
16909  */
16910  __Pyx_TraceLine(1045,0,__PYX_ERR(1, 1045, __pyx_L1_error))
16911  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
16912  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
16913  __pyx_t_6 = __pyx_t_8;
16914  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1045, __pyx_L1_error)
16915  __Pyx_GOTREF(__pyx_t_2);
16916  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
16917  __pyx_t_2 = 0;
16918 
16919  /* "View.MemoryView":1046
16920  * result.view.len = result.view.itemsize
16921  * for length in result.view.shape[:ndim]:
16922  * result.view.len *= length # <<<<<<<<<<<<<<
16923  *
16924  * result.to_object_func = to_object_func
16925  */
16926  __Pyx_TraceLine(1046,0,__PYX_ERR(1, 1046, __pyx_L1_error))
16927  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1046, __pyx_L1_error)
16928  __Pyx_GOTREF(__pyx_t_2);
16929  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1046, __pyx_L1_error)
16930  __Pyx_GOTREF(__pyx_t_3);
16931  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16932  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1046, __pyx_L1_error)
16933  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16934  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
16935  }
16936 
16937  /* "View.MemoryView":1048
16938  * result.view.len *= length
16939  *
16940  * result.to_object_func = to_object_func # <<<<<<<<<<<<<<
16941  * result.to_dtype_func = to_dtype_func
16942  *
16943  */
16944  __Pyx_TraceLine(1048,0,__PYX_ERR(1, 1048, __pyx_L1_error))
16945  __pyx_v_result->to_object_func = __pyx_v_to_object_func;
16946 
16947  /* "View.MemoryView":1049
16948  *
16949  * result.to_object_func = to_object_func
16950  * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
16951  *
16952  * return result
16953  */
16954  __Pyx_TraceLine(1049,0,__PYX_ERR(1, 1049, __pyx_L1_error))
16955  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
16956 
16957  /* "View.MemoryView":1051
16958  * result.to_dtype_func = to_dtype_func
16959  *
16960  * return result # <<<<<<<<<<<<<<
16961  *
16962  * @cname('__pyx_memoryview_get_slice_from_memoryview')
16963  */
16964  __Pyx_TraceLine(1051,0,__PYX_ERR(1, 1051, __pyx_L1_error))
16965  __Pyx_XDECREF(__pyx_r);
16966  __Pyx_INCREF(((PyObject *)__pyx_v_result));
16967  __pyx_r = ((PyObject *)__pyx_v_result);
16968  goto __pyx_L0;
16969 
16970  /* "View.MemoryView":1001
16971  *
16972  * @cname('__pyx_memoryview_fromslice')
16973  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
16974  * int ndim,
16975  * object (*to_object_func)(char *),
16976  */
16977 
16978  /* function exit code */
16979  __pyx_L1_error:;
16980  __Pyx_XDECREF(__pyx_t_2);
16981  __Pyx_XDECREF(__pyx_t_3);
16982  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
16983  __pyx_r = 0;
16984  __pyx_L0:;
16985  __Pyx_XDECREF((PyObject *)__pyx_v_result);
16986  __Pyx_XDECREF(__pyx_v_length);
16987  __Pyx_XGIVEREF(__pyx_r);
16988  __Pyx_TraceReturn(__pyx_r, 0);
16989  __Pyx_RefNannyFinishContext();
16990  return __pyx_r;
16991 }
16992 
16993 /* "View.MemoryView":1054
16994  *
16995  * @cname('__pyx_memoryview_get_slice_from_memoryview')
16996  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
16997  * __Pyx_memviewslice *mslice) except NULL:
16998  * cdef _memoryviewslice obj
16999  */
17000 
17001 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
17002  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
17003  __Pyx_memviewslice *__pyx_r;
17004  __Pyx_TraceDeclarations
17005  __Pyx_RefNannyDeclarations
17006  int __pyx_t_1;
17007  int __pyx_t_2;
17008  PyObject *__pyx_t_3 = NULL;
17009  int __pyx_lineno = 0;
17010  const char *__pyx_filename = NULL;
17011  int __pyx_clineno = 0;
17012  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
17013  __Pyx_TraceCall("get_slice_from_memview", __pyx_f[1], 1054, 0, __PYX_ERR(1, 1054, __pyx_L1_error));
17014 
17015  /* "View.MemoryView":1057
17016  * __Pyx_memviewslice *mslice) except NULL:
17017  * cdef _memoryviewslice obj
17018  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
17019  * obj = memview
17020  * return &obj.from_slice
17021  */
17022  __Pyx_TraceLine(1057,0,__PYX_ERR(1, 1057, __pyx_L1_error))
17023  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
17024  __pyx_t_2 = (__pyx_t_1 != 0);
17025  if (__pyx_t_2) {
17026 
17027  /* "View.MemoryView":1058
17028  * cdef _memoryviewslice obj
17029  * if isinstance(memview, _memoryviewslice):
17030  * obj = memview # <<<<<<<<<<<<<<
17031  * return &obj.from_slice
17032  * else:
17033  */
17034  __Pyx_TraceLine(1058,0,__PYX_ERR(1, 1058, __pyx_L1_error))
17035  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1058, __pyx_L1_error)
17036  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
17037  __Pyx_INCREF(__pyx_t_3);
17038  __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
17039  __pyx_t_3 = 0;
17040 
17041  /* "View.MemoryView":1059
17042  * if isinstance(memview, _memoryviewslice):
17043  * obj = memview
17044  * return &obj.from_slice # <<<<<<<<<<<<<<
17045  * else:
17046  * slice_copy(memview, mslice)
17047  */
17048  __Pyx_TraceLine(1059,0,__PYX_ERR(1, 1059, __pyx_L1_error))
17049  __pyx_r = (&__pyx_v_obj->from_slice);
17050  goto __pyx_L0;
17051 
17052  /* "View.MemoryView":1057
17053  * __Pyx_memviewslice *mslice) except NULL:
17054  * cdef _memoryviewslice obj
17055  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
17056  * obj = memview
17057  * return &obj.from_slice
17058  */
17059  }
17060 
17061  /* "View.MemoryView":1061
17062  * return &obj.from_slice
17063  * else:
17064  * slice_copy(memview, mslice) # <<<<<<<<<<<<<<
17065  * return mslice
17066  *
17067  */
17068  __Pyx_TraceLine(1061,0,__PYX_ERR(1, 1061, __pyx_L1_error))
17069  /*else*/ {
17070  __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
17071 
17072  /* "View.MemoryView":1062
17073  * else:
17074  * slice_copy(memview, mslice)
17075  * return mslice # <<<<<<<<<<<<<<
17076  *
17077  * @cname('__pyx_memoryview_slice_copy')
17078  */
17079  __Pyx_TraceLine(1062,0,__PYX_ERR(1, 1062, __pyx_L1_error))
17080  __pyx_r = __pyx_v_mslice;
17081  goto __pyx_L0;
17082  }
17083 
17084  /* "View.MemoryView":1054
17085  *
17086  * @cname('__pyx_memoryview_get_slice_from_memoryview')
17087  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
17088  * __Pyx_memviewslice *mslice) except NULL:
17089  * cdef _memoryviewslice obj
17090  */
17091 
17092  /* function exit code */
17093  __pyx_L1_error:;
17094  __Pyx_XDECREF(__pyx_t_3);
17095  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
17096  __pyx_r = NULL;
17097  __pyx_L0:;
17098  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
17099  __Pyx_TraceReturn(Py_None, 0);
17100  __Pyx_RefNannyFinishContext();
17101  return __pyx_r;
17102 }
17103 
17104 /* "View.MemoryView":1065
17105  *
17106  * @cname('__pyx_memoryview_slice_copy')
17107  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
17108  * cdef int dim
17109  * cdef (Py_ssize_t*) shape, strides, suboffsets
17110  */
17111 
17112 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
17113  int __pyx_v_dim;
17114  Py_ssize_t *__pyx_v_shape;
17115  Py_ssize_t *__pyx_v_strides;
17116  Py_ssize_t *__pyx_v_suboffsets;
17117  __Pyx_TraceDeclarations
17118  __Pyx_RefNannyDeclarations
17119  Py_ssize_t *__pyx_t_1;
17120  int __pyx_t_2;
17121  int __pyx_t_3;
17122  int __pyx_t_4;
17123  Py_ssize_t __pyx_t_5;
17124  int __pyx_lineno = 0;
17125  const char *__pyx_filename = NULL;
17126  int __pyx_clineno = 0;
17127  __Pyx_RefNannySetupContext("slice_copy", 0);
17128  __Pyx_TraceCall("slice_copy", __pyx_f[1], 1065, 0, __PYX_ERR(1, 1065, __pyx_L1_error));
17129 
17130  /* "View.MemoryView":1069
17131  * cdef (Py_ssize_t*) shape, strides, suboffsets
17132  *
17133  * shape = memview.view.shape # <<<<<<<<<<<<<<
17134  * strides = memview.view.strides
17135  * suboffsets = memview.view.suboffsets
17136  */
17137  __Pyx_TraceLine(1069,0,__PYX_ERR(1, 1069, __pyx_L1_error))
17138  __pyx_t_1 = __pyx_v_memview->view.shape;
17139  __pyx_v_shape = __pyx_t_1;
17140 
17141  /* "View.MemoryView":1070
17142  *
17143  * shape = memview.view.shape
17144  * strides = memview.view.strides # <<<<<<<<<<<<<<
17145  * suboffsets = memview.view.suboffsets
17146  *
17147  */
17148  __Pyx_TraceLine(1070,0,__PYX_ERR(1, 1070, __pyx_L1_error))
17149  __pyx_t_1 = __pyx_v_memview->view.strides;
17150  __pyx_v_strides = __pyx_t_1;
17151 
17152  /* "View.MemoryView":1071
17153  * shape = memview.view.shape
17154  * strides = memview.view.strides
17155  * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
17156  *
17157  * dst.memview = <__pyx_memoryview *> memview
17158  */
17159  __Pyx_TraceLine(1071,0,__PYX_ERR(1, 1071, __pyx_L1_error))
17160  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
17161  __pyx_v_suboffsets = __pyx_t_1;
17162 
17163  /* "View.MemoryView":1073
17164  * suboffsets = memview.view.suboffsets
17165  *
17166  * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
17167  * dst.data = <char *> memview.view.buf
17168  *
17169  */
17170  __Pyx_TraceLine(1073,0,__PYX_ERR(1, 1073, __pyx_L1_error))
17171  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
17172 
17173  /* "View.MemoryView":1074
17174  *
17175  * dst.memview = <__pyx_memoryview *> memview
17176  * dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
17177  *
17178  * for dim in range(memview.view.ndim):
17179  */
17180  __Pyx_TraceLine(1074,0,__PYX_ERR(1, 1074, __pyx_L1_error))
17181  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
17182 
17183  /* "View.MemoryView":1076
17184  * dst.data = <char *> memview.view.buf
17185  *
17186  * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
17187  * dst.shape[dim] = shape[dim]
17188  * dst.strides[dim] = strides[dim]
17189  */
17190  __Pyx_TraceLine(1076,0,__PYX_ERR(1, 1076, __pyx_L1_error))
17191  __pyx_t_2 = __pyx_v_memview->view.ndim;
17192  __pyx_t_3 = __pyx_t_2;
17193  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
17194  __pyx_v_dim = __pyx_t_4;
17195 
17196  /* "View.MemoryView":1077
17197  *
17198  * for dim in range(memview.view.ndim):
17199  * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
17200  * dst.strides[dim] = strides[dim]
17201  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
17202  */
17203  __Pyx_TraceLine(1077,0,__PYX_ERR(1, 1077, __pyx_L1_error))
17204  (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
17205 
17206  /* "View.MemoryView":1078
17207  * for dim in range(memview.view.ndim):
17208  * dst.shape[dim] = shape[dim]
17209  * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
17210  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
17211  *
17212  */
17213  __Pyx_TraceLine(1078,0,__PYX_ERR(1, 1078, __pyx_L1_error))
17214  (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
17215 
17216  /* "View.MemoryView":1079
17217  * dst.shape[dim] = shape[dim]
17218  * dst.strides[dim] = strides[dim]
17219  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
17220  *
17221  * @cname('__pyx_memoryview_copy_object')
17222  */
17223  __Pyx_TraceLine(1079,0,__PYX_ERR(1, 1079, __pyx_L1_error))
17224  if ((__pyx_v_suboffsets != 0)) {
17225  __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
17226  } else {
17227  __pyx_t_5 = -1L;
17228  }
17229  (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
17230  }
17231 
17232  /* "View.MemoryView":1065
17233  *
17234  * @cname('__pyx_memoryview_slice_copy')
17235  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
17236  * cdef int dim
17237  * cdef (Py_ssize_t*) shape, strides, suboffsets
17238  */
17239 
17240  /* function exit code */
17241  goto __pyx_L0;
17242  __pyx_L1_error:;
17243  __Pyx_WriteUnraisable("View.MemoryView.slice_copy", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
17244  __pyx_L0:;
17245  __Pyx_TraceReturn(Py_None, 0);
17246  __Pyx_RefNannyFinishContext();
17247 }
17248 
17249 /* "View.MemoryView":1082
17250  *
17251  * @cname('__pyx_memoryview_copy_object')
17252  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
17253  * "Create a new memoryview object"
17254  * cdef __Pyx_memviewslice memviewslice
17255  */
17256 
17257 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
17258  __Pyx_memviewslice __pyx_v_memviewslice;
17259  PyObject *__pyx_r = NULL;
17260  __Pyx_TraceDeclarations
17261  __Pyx_RefNannyDeclarations
17262  PyObject *__pyx_t_1 = NULL;
17263  int __pyx_lineno = 0;
17264  const char *__pyx_filename = NULL;
17265  int __pyx_clineno = 0;
17266  __Pyx_RefNannySetupContext("memoryview_copy", 0);
17267  __Pyx_TraceCall("memoryview_copy", __pyx_f[1], 1082, 0, __PYX_ERR(1, 1082, __pyx_L1_error));
17268 
17269  /* "View.MemoryView":1085
17270  * "Create a new memoryview object"
17271  * cdef __Pyx_memviewslice memviewslice
17272  * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
17273  * return memoryview_copy_from_slice(memview, &memviewslice)
17274  *
17275  */
17276  __Pyx_TraceLine(1085,0,__PYX_ERR(1, 1085, __pyx_L1_error))
17277  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
17278 
17279  /* "View.MemoryView":1086
17280  * cdef __Pyx_memviewslice memviewslice
17281  * slice_copy(memview, &memviewslice)
17282  * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
17283  *
17284  * @cname('__pyx_memoryview_copy_object_from_slice')
17285  */
17286  __Pyx_TraceLine(1086,0,__PYX_ERR(1, 1086, __pyx_L1_error))
17287  __Pyx_XDECREF(__pyx_r);
17288  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1086, __pyx_L1_error)
17289  __Pyx_GOTREF(__pyx_t_1);
17290  __pyx_r = __pyx_t_1;
17291  __pyx_t_1 = 0;
17292  goto __pyx_L0;
17293 
17294  /* "View.MemoryView":1082
17295  *
17296  * @cname('__pyx_memoryview_copy_object')
17297  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
17298  * "Create a new memoryview object"
17299  * cdef __Pyx_memviewslice memviewslice
17300  */
17301 
17302  /* function exit code */
17303  __pyx_L1_error:;
17304  __Pyx_XDECREF(__pyx_t_1);
17305  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
17306  __pyx_r = 0;
17307  __pyx_L0:;
17308  __Pyx_XGIVEREF(__pyx_r);
17309  __Pyx_TraceReturn(__pyx_r, 0);
17310  __Pyx_RefNannyFinishContext();
17311  return __pyx_r;
17312 }
17313 
17314 /* "View.MemoryView":1089
17315  *
17316  * @cname('__pyx_memoryview_copy_object_from_slice')
17317  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
17318  * """
17319  * Create a new memoryview object from a given memoryview object and slice.
17320  */
17321 
17322 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
17323  PyObject *(*__pyx_v_to_object_func)(char *);
17324  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
17325  PyObject *__pyx_r = NULL;
17326  __Pyx_TraceDeclarations
17327  __Pyx_RefNannyDeclarations
17328  int __pyx_t_1;
17329  int __pyx_t_2;
17330  PyObject *(*__pyx_t_3)(char *);
17331  int (*__pyx_t_4)(char *, PyObject *);
17332  PyObject *__pyx_t_5 = NULL;
17333  int __pyx_lineno = 0;
17334  const char *__pyx_filename = NULL;
17335  int __pyx_clineno = 0;
17336  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
17337  __Pyx_TraceCall("memoryview_copy_from_slice", __pyx_f[1], 1089, 0, __PYX_ERR(1, 1089, __pyx_L1_error));
17338 
17339  /* "View.MemoryView":1096
17340  * cdef int (*to_dtype_func)(char *, object) except 0
17341  *
17342  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
17343  * to_object_func = (<_memoryviewslice> memview).to_object_func
17344  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
17345  */
17346  __Pyx_TraceLine(1096,0,__PYX_ERR(1, 1096, __pyx_L1_error))
17347  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
17348  __pyx_t_2 = (__pyx_t_1 != 0);
17349  if (__pyx_t_2) {
17350 
17351  /* "View.MemoryView":1097
17352  *
17353  * if isinstance(memview, _memoryviewslice):
17354  * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
17355  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
17356  * else:
17357  */
17358  __Pyx_TraceLine(1097,0,__PYX_ERR(1, 1097, __pyx_L1_error))
17359  __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
17360  __pyx_v_to_object_func = __pyx_t_3;
17361 
17362  /* "View.MemoryView":1098
17363  * if isinstance(memview, _memoryviewslice):
17364  * to_object_func = (<_memoryviewslice> memview).to_object_func
17365  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
17366  * else:
17367  * to_object_func = NULL
17368  */
17369  __Pyx_TraceLine(1098,0,__PYX_ERR(1, 1098, __pyx_L1_error))
17370  __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
17371  __pyx_v_to_dtype_func = __pyx_t_4;
17372 
17373  /* "View.MemoryView":1096
17374  * cdef int (*to_dtype_func)(char *, object) except 0
17375  *
17376  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
17377  * to_object_func = (<_memoryviewslice> memview).to_object_func
17378  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
17379  */
17380  goto __pyx_L3;
17381  }
17382 
17383  /* "View.MemoryView":1100
17384  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
17385  * else:
17386  * to_object_func = NULL # <<<<<<<<<<<<<<
17387  * to_dtype_func = NULL
17388  *
17389  */
17390  __Pyx_TraceLine(1100,0,__PYX_ERR(1, 1100, __pyx_L1_error))
17391  /*else*/ {
17392  __pyx_v_to_object_func = NULL;
17393 
17394  /* "View.MemoryView":1101
17395  * else:
17396  * to_object_func = NULL
17397  * to_dtype_func = NULL # <<<<<<<<<<<<<<
17398  *
17399  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
17400  */
17401  __Pyx_TraceLine(1101,0,__PYX_ERR(1, 1101, __pyx_L1_error))
17402  __pyx_v_to_dtype_func = NULL;
17403  }
17404  __pyx_L3:;
17405 
17406  /* "View.MemoryView":1103
17407  * to_dtype_func = NULL
17408  *
17409  * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
17410  * to_object_func, to_dtype_func,
17411  * memview.dtype_is_object)
17412  */
17413  __Pyx_TraceLine(1103,0,__PYX_ERR(1, 1103, __pyx_L1_error))
17414  __Pyx_XDECREF(__pyx_r);
17415 
17416  /* "View.MemoryView":1105
17417  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
17418  * to_object_func, to_dtype_func,
17419  * memview.dtype_is_object) # <<<<<<<<<<<<<<
17420  *
17421  *
17422  */
17423  __Pyx_TraceLine(1105,0,__PYX_ERR(1, 1105, __pyx_L1_error))
17424  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1103, __pyx_L1_error)
17425  __Pyx_GOTREF(__pyx_t_5);
17426  __pyx_r = __pyx_t_5;
17427  __pyx_t_5 = 0;
17428  goto __pyx_L0;
17429 
17430  /* "View.MemoryView":1089
17431  *
17432  * @cname('__pyx_memoryview_copy_object_from_slice')
17433  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
17434  * """
17435  * Create a new memoryview object from a given memoryview object and slice.
17436  */
17437 
17438  /* function exit code */
17439  __pyx_L1_error:;
17440  __Pyx_XDECREF(__pyx_t_5);
17441  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
17442  __pyx_r = 0;
17443  __pyx_L0:;
17444  __Pyx_XGIVEREF(__pyx_r);
17445  __Pyx_TraceReturn(__pyx_r, 0);
17446  __Pyx_RefNannyFinishContext();
17447  return __pyx_r;
17448 }
17449 
17450 /* "View.MemoryView":1111
17451  *
17452  *
17453  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
17454  * if arg < 0:
17455  * return -arg
17456  */
17457 
17458 static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
17459  Py_ssize_t __pyx_r;
17460  __Pyx_TraceDeclarations
17461  int __pyx_t_1;
17462  int __pyx_lineno = 0;
17463  const char *__pyx_filename = NULL;
17464  int __pyx_clineno = 0;
17465  __Pyx_TraceCall("abs_py_ssize_t", __pyx_f[1], 1111, 1, __PYX_ERR(1, 1111, __pyx_L1_error));
17466 
17467  /* "View.MemoryView":1112
17468  *
17469  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
17470  * if arg < 0: # <<<<<<<<<<<<<<
17471  * return -arg
17472  * else:
17473  */
17474  __Pyx_TraceLine(1112,1,__PYX_ERR(1, 1112, __pyx_L1_error))
17475  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
17476  if (__pyx_t_1) {
17477 
17478  /* "View.MemoryView":1113
17479  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
17480  * if arg < 0:
17481  * return -arg # <<<<<<<<<<<<<<
17482  * else:
17483  * return arg
17484  */
17485  __Pyx_TraceLine(1113,1,__PYX_ERR(1, 1113, __pyx_L1_error))
17486  __pyx_r = (-__pyx_v_arg);
17487  goto __pyx_L0;
17488 
17489  /* "View.MemoryView":1112
17490  *
17491  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
17492  * if arg < 0: # <<<<<<<<<<<<<<
17493  * return -arg
17494  * else:
17495  */
17496  }
17497 
17498  /* "View.MemoryView":1115
17499  * return -arg
17500  * else:
17501  * return arg # <<<<<<<<<<<<<<
17502  *
17503  * @cname('__pyx_get_best_slice_order')
17504  */
17505  __Pyx_TraceLine(1115,1,__PYX_ERR(1, 1115, __pyx_L1_error))
17506  /*else*/ {
17507  __pyx_r = __pyx_v_arg;
17508  goto __pyx_L0;
17509  }
17510 
17511  /* "View.MemoryView":1111
17512  *
17513  *
17514  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
17515  * if arg < 0:
17516  * return -arg
17517  */
17518 
17519  /* function exit code */
17520  __pyx_L1_error:;
17521  __Pyx_WriteUnraisable("View.MemoryView.abs_py_ssize_t", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
17522  __pyx_r = 0;
17523  __pyx_L0:;
17524  __Pyx_TraceReturn(Py_None, 1);
17525  return __pyx_r;
17526 }
17527 
17528 /* "View.MemoryView":1118
17529  *
17530  * @cname('__pyx_get_best_slice_order')
17531  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
17532  * """
17533  * Figure out the best memory access order for a given slice.
17534  */
17535 
17536 static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
17537  int __pyx_v_i;
17538  Py_ssize_t __pyx_v_c_stride;
17539  Py_ssize_t __pyx_v_f_stride;
17540  char __pyx_r;
17541  __Pyx_TraceDeclarations
17542  int __pyx_t_1;
17543  int __pyx_t_2;
17544  int __pyx_t_3;
17545  int __pyx_t_4;
17546  int __pyx_lineno = 0;
17547  const char *__pyx_filename = NULL;
17548  int __pyx_clineno = 0;
17549  __Pyx_TraceCall("get_best_order", __pyx_f[1], 1118, 1, __PYX_ERR(1, 1118, __pyx_L1_error));
17550 
17551  /* "View.MemoryView":1123
17552  * """
17553  * cdef int i
17554  * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
17555  * cdef Py_ssize_t f_stride = 0
17556  *
17557  */
17558  __Pyx_TraceLine(1123,1,__PYX_ERR(1, 1123, __pyx_L1_error))
17559  __pyx_v_c_stride = 0;
17560 
17561  /* "View.MemoryView":1124
17562  * cdef int i
17563  * cdef Py_ssize_t c_stride = 0
17564  * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
17565  *
17566  * for i in range(ndim - 1, -1, -1):
17567  */
17568  __Pyx_TraceLine(1124,1,__PYX_ERR(1, 1124, __pyx_L1_error))
17569  __pyx_v_f_stride = 0;
17570 
17571  /* "View.MemoryView":1126
17572  * cdef Py_ssize_t f_stride = 0
17573  *
17574  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
17575  * if mslice.shape[i] > 1:
17576  * c_stride = mslice.strides[i]
17577  */
17578  __Pyx_TraceLine(1126,1,__PYX_ERR(1, 1126, __pyx_L1_error))
17579  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
17580  __pyx_v_i = __pyx_t_1;
17581 
17582  /* "View.MemoryView":1127
17583  *
17584  * for i in range(ndim - 1, -1, -1):
17585  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
17586  * c_stride = mslice.strides[i]
17587  * break
17588  */
17589  __Pyx_TraceLine(1127,1,__PYX_ERR(1, 1127, __pyx_L1_error))
17590  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
17591  if (__pyx_t_2) {
17592 
17593  /* "View.MemoryView":1128
17594  * for i in range(ndim - 1, -1, -1):
17595  * if mslice.shape[i] > 1:
17596  * c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
17597  * break
17598  *
17599  */
17600  __Pyx_TraceLine(1128,1,__PYX_ERR(1, 1128, __pyx_L1_error))
17601  __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
17602 
17603  /* "View.MemoryView":1129
17604  * if mslice.shape[i] > 1:
17605  * c_stride = mslice.strides[i]
17606  * break # <<<<<<<<<<<<<<
17607  *
17608  * for i in range(ndim):
17609  */
17610  __Pyx_TraceLine(1129,1,__PYX_ERR(1, 1129, __pyx_L1_error))
17611  goto __pyx_L4_break;
17612 
17613  /* "View.MemoryView":1127
17614  *
17615  * for i in range(ndim - 1, -1, -1):
17616  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
17617  * c_stride = mslice.strides[i]
17618  * break
17619  */
17620  }
17621  }
17622  __pyx_L4_break:;
17623 
17624  /* "View.MemoryView":1131
17625  * break
17626  *
17627  * for i in range(ndim): # <<<<<<<<<<<<<<
17628  * if mslice.shape[i] > 1:
17629  * f_stride = mslice.strides[i]
17630  */
17631  __Pyx_TraceLine(1131,1,__PYX_ERR(1, 1131, __pyx_L1_error))
17632  __pyx_t_1 = __pyx_v_ndim;
17633  __pyx_t_3 = __pyx_t_1;
17634  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
17635  __pyx_v_i = __pyx_t_4;
17636 
17637  /* "View.MemoryView":1132
17638  *
17639  * for i in range(ndim):
17640  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
17641  * f_stride = mslice.strides[i]
17642  * break
17643  */
17644  __Pyx_TraceLine(1132,1,__PYX_ERR(1, 1132, __pyx_L1_error))
17645  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
17646  if (__pyx_t_2) {
17647 
17648  /* "View.MemoryView":1133
17649  * for i in range(ndim):
17650  * if mslice.shape[i] > 1:
17651  * f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
17652  * break
17653  *
17654  */
17655  __Pyx_TraceLine(1133,1,__PYX_ERR(1, 1133, __pyx_L1_error))
17656  __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
17657 
17658  /* "View.MemoryView":1134
17659  * if mslice.shape[i] > 1:
17660  * f_stride = mslice.strides[i]
17661  * break # <<<<<<<<<<<<<<
17662  *
17663  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
17664  */
17665  __Pyx_TraceLine(1134,1,__PYX_ERR(1, 1134, __pyx_L1_error))
17666  goto __pyx_L7_break;
17667 
17668  /* "View.MemoryView":1132
17669  *
17670  * for i in range(ndim):
17671  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
17672  * f_stride = mslice.strides[i]
17673  * break
17674  */
17675  }
17676  }
17677  __pyx_L7_break:;
17678 
17679  /* "View.MemoryView":1136
17680  * break
17681  *
17682  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
17683  * return 'C'
17684  * else:
17685  */
17686  __Pyx_TraceLine(1136,1,__PYX_ERR(1, 1136, __pyx_L1_error))
17687  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
17688  if (__pyx_t_2) {
17689 
17690  /* "View.MemoryView":1137
17691  *
17692  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
17693  * return 'C' # <<<<<<<<<<<<<<
17694  * else:
17695  * return 'F'
17696  */
17697  __Pyx_TraceLine(1137,1,__PYX_ERR(1, 1137, __pyx_L1_error))
17698  __pyx_r = 'C';
17699  goto __pyx_L0;
17700 
17701  /* "View.MemoryView":1136
17702  * break
17703  *
17704  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
17705  * return 'C'
17706  * else:
17707  */
17708  }
17709 
17710  /* "View.MemoryView":1139
17711  * return 'C'
17712  * else:
17713  * return 'F' # <<<<<<<<<<<<<<
17714  *
17715  * @cython.cdivision(True)
17716  */
17717  __Pyx_TraceLine(1139,1,__PYX_ERR(1, 1139, __pyx_L1_error))
17718  /*else*/ {
17719  __pyx_r = 'F';
17720  goto __pyx_L0;
17721  }
17722 
17723  /* "View.MemoryView":1118
17724  *
17725  * @cname('__pyx_get_best_slice_order')
17726  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
17727  * """
17728  * Figure out the best memory access order for a given slice.
17729  */
17730 
17731  /* function exit code */
17732  __pyx_L1_error:;
17733  __Pyx_WriteUnraisable("View.MemoryView.get_best_order", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
17734  __pyx_r = 0;
17735  __pyx_L0:;
17736  __Pyx_TraceReturn(Py_None, 1);
17737  return __pyx_r;
17738 }
17739 
17740 /* "View.MemoryView":1142
17741  *
17742  * @cython.cdivision(True)
17743  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
17744  * char *dst_data, Py_ssize_t *dst_strides,
17745  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
17746  */
17747 
17748 static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
17749  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
17750  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
17751  Py_ssize_t __pyx_v_dst_extent;
17752  Py_ssize_t __pyx_v_src_stride;
17753  Py_ssize_t __pyx_v_dst_stride;
17754  int __pyx_t_1;
17755  int __pyx_t_2;
17756  int __pyx_t_3;
17757  Py_ssize_t __pyx_t_4;
17758  Py_ssize_t __pyx_t_5;
17759  Py_ssize_t __pyx_t_6;
17760 
17761  /* "View.MemoryView":1149
17762  *
17763  * cdef Py_ssize_t i
17764  * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
17765  * cdef Py_ssize_t dst_extent = dst_shape[0]
17766  * cdef Py_ssize_t src_stride = src_strides[0]
17767  */
17768  __pyx_v_src_extent = (__pyx_v_src_shape[0]);
17769 
17770  /* "View.MemoryView":1150
17771  * cdef Py_ssize_t i
17772  * cdef Py_ssize_t src_extent = src_shape[0]
17773  * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
17774  * cdef Py_ssize_t src_stride = src_strides[0]
17775  * cdef Py_ssize_t dst_stride = dst_strides[0]
17776  */
17777  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
17778 
17779  /* "View.MemoryView":1151
17780  * cdef Py_ssize_t src_extent = src_shape[0]
17781  * cdef Py_ssize_t dst_extent = dst_shape[0]
17782  * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
17783  * cdef Py_ssize_t dst_stride = dst_strides[0]
17784  *
17785  */
17786  __pyx_v_src_stride = (__pyx_v_src_strides[0]);
17787 
17788  /* "View.MemoryView":1152
17789  * cdef Py_ssize_t dst_extent = dst_shape[0]
17790  * cdef Py_ssize_t src_stride = src_strides[0]
17791  * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
17792  *
17793  * if ndim == 1:
17794  */
17795  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
17796 
17797  /* "View.MemoryView":1154
17798  * cdef Py_ssize_t dst_stride = dst_strides[0]
17799  *
17800  * if ndim == 1: # <<<<<<<<<<<<<<
17801  * if (src_stride > 0 and dst_stride > 0 and
17802  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17803  */
17804  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
17805  if (__pyx_t_1) {
17806 
17807  /* "View.MemoryView":1155
17808  *
17809  * if ndim == 1:
17810  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
17811  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17812  * memcpy(dst_data, src_data, itemsize * dst_extent)
17813  */
17814  __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
17815  if (__pyx_t_2) {
17816  } else {
17817  __pyx_t_1 = __pyx_t_2;
17818  goto __pyx_L5_bool_binop_done;
17819  }
17820  __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
17821  if (__pyx_t_2) {
17822  } else {
17823  __pyx_t_1 = __pyx_t_2;
17824  goto __pyx_L5_bool_binop_done;
17825  }
17826 
17827  /* "View.MemoryView":1156
17828  * if ndim == 1:
17829  * if (src_stride > 0 and dst_stride > 0 and
17830  * <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
17831  * memcpy(dst_data, src_data, itemsize * dst_extent)
17832  * else:
17833  */
17834  __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
17835  if (__pyx_t_2) {
17836  __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
17837  }
17838  __pyx_t_3 = (__pyx_t_2 != 0);
17839  __pyx_t_1 = __pyx_t_3;
17840  __pyx_L5_bool_binop_done:;
17841 
17842  /* "View.MemoryView":1155
17843  *
17844  * if ndim == 1:
17845  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
17846  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17847  * memcpy(dst_data, src_data, itemsize * dst_extent)
17848  */
17849  if (__pyx_t_1) {
17850 
17851  /* "View.MemoryView":1157
17852  * if (src_stride > 0 and dst_stride > 0 and
17853  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17854  * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<<
17855  * else:
17856  * for i in range(dst_extent):
17857  */
17858  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
17859 
17860  /* "View.MemoryView":1155
17861  *
17862  * if ndim == 1:
17863  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
17864  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17865  * memcpy(dst_data, src_data, itemsize * dst_extent)
17866  */
17867  goto __pyx_L4;
17868  }
17869 
17870  /* "View.MemoryView":1159
17871  * memcpy(dst_data, src_data, itemsize * dst_extent)
17872  * else:
17873  * for i in range(dst_extent): # <<<<<<<<<<<<<<
17874  * memcpy(dst_data, src_data, itemsize)
17875  * src_data += src_stride
17876  */
17877  /*else*/ {
17878  __pyx_t_4 = __pyx_v_dst_extent;
17879  __pyx_t_5 = __pyx_t_4;
17880  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
17881  __pyx_v_i = __pyx_t_6;
17882 
17883  /* "View.MemoryView":1160
17884  * else:
17885  * for i in range(dst_extent):
17886  * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
17887  * src_data += src_stride
17888  * dst_data += dst_stride
17889  */
17890  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
17891 
17892  /* "View.MemoryView":1161
17893  * for i in range(dst_extent):
17894  * memcpy(dst_data, src_data, itemsize)
17895  * src_data += src_stride # <<<<<<<<<<<<<<
17896  * dst_data += dst_stride
17897  * else:
17898  */
17899  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
17900 
17901  /* "View.MemoryView":1162
17902  * memcpy(dst_data, src_data, itemsize)
17903  * src_data += src_stride
17904  * dst_data += dst_stride # <<<<<<<<<<<<<<
17905  * else:
17906  * for i in range(dst_extent):
17907  */
17908  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
17909  }
17910  }
17911  __pyx_L4:;
17912 
17913  /* "View.MemoryView":1154
17914  * cdef Py_ssize_t dst_stride = dst_strides[0]
17915  *
17916  * if ndim == 1: # <<<<<<<<<<<<<<
17917  * if (src_stride > 0 and dst_stride > 0 and
17918  * <size_t> src_stride == itemsize == <size_t> dst_stride):
17919  */
17920  goto __pyx_L3;
17921  }
17922 
17923  /* "View.MemoryView":1164
17924  * dst_data += dst_stride
17925  * else:
17926  * for i in range(dst_extent): # <<<<<<<<<<<<<<
17927  * _copy_strided_to_strided(src_data, src_strides + 1,
17928  * dst_data, dst_strides + 1,
17929  */
17930  /*else*/ {
17931  __pyx_t_4 = __pyx_v_dst_extent;
17932  __pyx_t_5 = __pyx_t_4;
17933  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
17934  __pyx_v_i = __pyx_t_6;
17935 
17936  /* "View.MemoryView":1165
17937  * else:
17938  * for i in range(dst_extent):
17939  * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
17940  * dst_data, dst_strides + 1,
17941  * src_shape + 1, dst_shape + 1,
17942  */
17943  _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
17944 
17945  /* "View.MemoryView":1169
17946  * src_shape + 1, dst_shape + 1,
17947  * ndim - 1, itemsize)
17948  * src_data += src_stride # <<<<<<<<<<<<<<
17949  * dst_data += dst_stride
17950  *
17951  */
17952  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
17953 
17954  /* "View.MemoryView":1170
17955  * ndim - 1, itemsize)
17956  * src_data += src_stride
17957  * dst_data += dst_stride # <<<<<<<<<<<<<<
17958  *
17959  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
17960  */
17961  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
17962  }
17963  }
17964  __pyx_L3:;
17965 
17966  /* "View.MemoryView":1142
17967  *
17968  * @cython.cdivision(True)
17969  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
17970  * char *dst_data, Py_ssize_t *dst_strides,
17971  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
17972  */
17973 
17974  /* function exit code */
17975 }
17976 
17977 /* "View.MemoryView":1172
17978  * dst_data += dst_stride
17979  *
17980  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
17981  * __Pyx_memviewslice *dst,
17982  * int ndim, size_t itemsize) nogil:
17983  */
17984 
17985 static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
17986  __Pyx_TraceDeclarations
17987  int __pyx_lineno = 0;
17988  const char *__pyx_filename = NULL;
17989  int __pyx_clineno = 0;
17990  __Pyx_TraceCall("copy_strided_to_strided", __pyx_f[1], 1172, 1, __PYX_ERR(1, 1172, __pyx_L1_error));
17991 
17992  /* "View.MemoryView":1175
17993  * __Pyx_memviewslice *dst,
17994  * int ndim, size_t itemsize) nogil:
17995  * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
17996  * src.shape, dst.shape, ndim, itemsize)
17997  *
17998  */
17999  __Pyx_TraceLine(1175,1,__PYX_ERR(1, 1175, __pyx_L1_error))
18000  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
18001 
18002  /* "View.MemoryView":1172
18003  * dst_data += dst_stride
18004  *
18005  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
18006  * __Pyx_memviewslice *dst,
18007  * int ndim, size_t itemsize) nogil:
18008  */
18009 
18010  /* function exit code */
18011  goto __pyx_L0;
18012  __pyx_L1_error:;
18013  __Pyx_WriteUnraisable("View.MemoryView.copy_strided_to_strided", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
18014  __pyx_L0:;
18015  __Pyx_TraceReturn(Py_None, 1);
18016 }
18017 
18018 /* "View.MemoryView":1179
18019  *
18020  * @cname('__pyx_memoryview_slice_get_size')
18021  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
18022  * "Return the size of the memory occupied by the slice in number of bytes"
18023  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
18024  */
18025 
18026 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
18027  Py_ssize_t __pyx_v_shape;
18028  Py_ssize_t __pyx_v_size;
18029  Py_ssize_t __pyx_r;
18030  __Pyx_TraceDeclarations
18031  Py_ssize_t __pyx_t_1;
18032  Py_ssize_t *__pyx_t_2;
18033  Py_ssize_t *__pyx_t_3;
18034  Py_ssize_t *__pyx_t_4;
18035  int __pyx_lineno = 0;
18036  const char *__pyx_filename = NULL;
18037  int __pyx_clineno = 0;
18038  __Pyx_TraceCall("slice_get_size", __pyx_f[1], 1179, 1, __PYX_ERR(1, 1179, __pyx_L1_error));
18039 
18040  /* "View.MemoryView":1181
18041  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:
18042  * "Return the size of the memory occupied by the slice in number of bytes"
18043  * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<<
18044  *
18045  * for shape in src.shape[:ndim]:
18046  */
18047  __Pyx_TraceLine(1181,1,__PYX_ERR(1, 1181, __pyx_L1_error))
18048  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
18049  __pyx_v_size = __pyx_t_1;
18050 
18051  /* "View.MemoryView":1183
18052  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
18053  *
18054  * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<<
18055  * size *= shape
18056  *
18057  */
18058  __Pyx_TraceLine(1183,1,__PYX_ERR(1, 1183, __pyx_L1_error))
18059  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
18060  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
18061  __pyx_t_2 = __pyx_t_4;
18062  __pyx_v_shape = (__pyx_t_2[0]);
18063 
18064  /* "View.MemoryView":1184
18065  *
18066  * for shape in src.shape[:ndim]:
18067  * size *= shape # <<<<<<<<<<<<<<
18068  *
18069  * return size
18070  */
18071  __Pyx_TraceLine(1184,1,__PYX_ERR(1, 1184, __pyx_L1_error))
18072  __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
18073  }
18074 
18075  /* "View.MemoryView":1186
18076  * size *= shape
18077  *
18078  * return size # <<<<<<<<<<<<<<
18079  *
18080  * @cname('__pyx_fill_contig_strides_array')
18081  */
18082  __Pyx_TraceLine(1186,1,__PYX_ERR(1, 1186, __pyx_L1_error))
18083  __pyx_r = __pyx_v_size;
18084  goto __pyx_L0;
18085 
18086  /* "View.MemoryView":1179
18087  *
18088  * @cname('__pyx_memoryview_slice_get_size')
18089  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
18090  * "Return the size of the memory occupied by the slice in number of bytes"
18091  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
18092  */
18093 
18094  /* function exit code */
18095  __pyx_L1_error:;
18096  __Pyx_WriteUnraisable("View.MemoryView.slice_get_size", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
18097  __pyx_r = 0;
18098  __pyx_L0:;
18099  __Pyx_TraceReturn(Py_None, 1);
18100  return __pyx_r;
18101 }
18102 
18103 /* "View.MemoryView":1189
18104  *
18105  * @cname('__pyx_fill_contig_strides_array')
18106  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
18107  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
18108  * int ndim, char order) nogil:
18109  */
18110 
18111 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
18112  int __pyx_v_idx;
18113  Py_ssize_t __pyx_r;
18114  __Pyx_TraceDeclarations
18115  int __pyx_t_1;
18116  int __pyx_t_2;
18117  int __pyx_t_3;
18118  int __pyx_t_4;
18119  int __pyx_lineno = 0;
18120  const char *__pyx_filename = NULL;
18121  int __pyx_clineno = 0;
18122  __Pyx_TraceCall("fill_contig_strides_array", __pyx_f[1], 1189, 1, __PYX_ERR(1, 1189, __pyx_L1_error));
18123 
18124  /* "View.MemoryView":1198
18125  * cdef int idx
18126  *
18127  * if order == 'F': # <<<<<<<<<<<<<<
18128  * for idx in range(ndim):
18129  * strides[idx] = stride
18130  */
18131  __Pyx_TraceLine(1198,1,__PYX_ERR(1, 1198, __pyx_L1_error))
18132  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
18133  if (__pyx_t_1) {
18134 
18135  /* "View.MemoryView":1199
18136  *
18137  * if order == 'F':
18138  * for idx in range(ndim): # <<<<<<<<<<<<<<
18139  * strides[idx] = stride
18140  * stride *= shape[idx]
18141  */
18142  __Pyx_TraceLine(1199,1,__PYX_ERR(1, 1199, __pyx_L1_error))
18143  __pyx_t_2 = __pyx_v_ndim;
18144  __pyx_t_3 = __pyx_t_2;
18145  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18146  __pyx_v_idx = __pyx_t_4;
18147 
18148  /* "View.MemoryView":1200
18149  * if order == 'F':
18150  * for idx in range(ndim):
18151  * strides[idx] = stride # <<<<<<<<<<<<<<
18152  * stride *= shape[idx]
18153  * else:
18154  */
18155  __Pyx_TraceLine(1200,1,__PYX_ERR(1, 1200, __pyx_L1_error))
18156  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
18157 
18158  /* "View.MemoryView":1201
18159  * for idx in range(ndim):
18160  * strides[idx] = stride
18161  * stride *= shape[idx] # <<<<<<<<<<<<<<
18162  * else:
18163  * for idx in range(ndim - 1, -1, -1):
18164  */
18165  __Pyx_TraceLine(1201,1,__PYX_ERR(1, 1201, __pyx_L1_error))
18166  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
18167  }
18168 
18169  /* "View.MemoryView":1198
18170  * cdef int idx
18171  *
18172  * if order == 'F': # <<<<<<<<<<<<<<
18173  * for idx in range(ndim):
18174  * strides[idx] = stride
18175  */
18176  goto __pyx_L3;
18177  }
18178 
18179  /* "View.MemoryView":1203
18180  * stride *= shape[idx]
18181  * else:
18182  * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
18183  * strides[idx] = stride
18184  * stride *= shape[idx]
18185  */
18186  __Pyx_TraceLine(1203,1,__PYX_ERR(1, 1203, __pyx_L1_error))
18187  /*else*/ {
18188  for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
18189  __pyx_v_idx = __pyx_t_2;
18190 
18191  /* "View.MemoryView":1204
18192  * else:
18193  * for idx in range(ndim - 1, -1, -1):
18194  * strides[idx] = stride # <<<<<<<<<<<<<<
18195  * stride *= shape[idx]
18196  *
18197  */
18198  __Pyx_TraceLine(1204,1,__PYX_ERR(1, 1204, __pyx_L1_error))
18199  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
18200 
18201  /* "View.MemoryView":1205
18202  * for idx in range(ndim - 1, -1, -1):
18203  * strides[idx] = stride
18204  * stride *= shape[idx] # <<<<<<<<<<<<<<
18205  *
18206  * return stride
18207  */
18208  __Pyx_TraceLine(1205,1,__PYX_ERR(1, 1205, __pyx_L1_error))
18209  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
18210  }
18211  }
18212  __pyx_L3:;
18213 
18214  /* "View.MemoryView":1207
18215  * stride *= shape[idx]
18216  *
18217  * return stride # <<<<<<<<<<<<<<
18218  *
18219  * @cname('__pyx_memoryview_copy_data_to_temp')
18220  */
18221  __Pyx_TraceLine(1207,1,__PYX_ERR(1, 1207, __pyx_L1_error))
18222  __pyx_r = __pyx_v_stride;
18223  goto __pyx_L0;
18224 
18225  /* "View.MemoryView":1189
18226  *
18227  * @cname('__pyx_fill_contig_strides_array')
18228  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
18229  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
18230  * int ndim, char order) nogil:
18231  */
18232 
18233  /* function exit code */
18234  __pyx_L1_error:;
18235  __Pyx_WriteUnraisable("View.MemoryView.fill_contig_strides_array", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
18236  __pyx_r = 0;
18237  __pyx_L0:;
18238  __Pyx_TraceReturn(Py_None, 1);
18239  return __pyx_r;
18240 }
18241 
18242 /* "View.MemoryView":1210
18243  *
18244  * @cname('__pyx_memoryview_copy_data_to_temp')
18245  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
18246  * __Pyx_memviewslice *tmpslice,
18247  * char order,
18248  */
18249 
18250 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
18251  int __pyx_v_i;
18252  void *__pyx_v_result;
18253  size_t __pyx_v_itemsize;
18254  size_t __pyx_v_size;
18255  void *__pyx_r;
18256  __Pyx_TraceDeclarations
18257  Py_ssize_t __pyx_t_1;
18258  int __pyx_t_2;
18259  int __pyx_t_3;
18260  struct __pyx_memoryview_obj *__pyx_t_4;
18261  int __pyx_t_5;
18262  int __pyx_t_6;
18263  int __pyx_lineno = 0;
18264  const char *__pyx_filename = NULL;
18265  int __pyx_clineno = 0;
18266  __Pyx_TraceCall("copy_data_to_temp", __pyx_f[1], 1210, 1, __PYX_ERR(1, 1210, __pyx_L1_error));
18267 
18268  /* "View.MemoryView":1221
18269  * cdef void *result
18270  *
18271  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
18272  * cdef size_t size = slice_get_size(src, ndim)
18273  *
18274  */
18275  __Pyx_TraceLine(1221,1,__PYX_ERR(1, 1221, __pyx_L1_error))
18276  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
18277  __pyx_v_itemsize = __pyx_t_1;
18278 
18279  /* "View.MemoryView":1222
18280  *
18281  * cdef size_t itemsize = src.memview.view.itemsize
18282  * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
18283  *
18284  * result = malloc(size)
18285  */
18286  __Pyx_TraceLine(1222,1,__PYX_ERR(1, 1222, __pyx_L1_error))
18287  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
18288 
18289  /* "View.MemoryView":1224
18290  * cdef size_t size = slice_get_size(src, ndim)
18291  *
18292  * result = malloc(size) # <<<<<<<<<<<<<<
18293  * if not result:
18294  * _err(MemoryError, NULL)
18295  */
18296  __Pyx_TraceLine(1224,1,__PYX_ERR(1, 1224, __pyx_L1_error))
18297  __pyx_v_result = malloc(__pyx_v_size);
18298 
18299  /* "View.MemoryView":1225
18300  *
18301  * result = malloc(size)
18302  * if not result: # <<<<<<<<<<<<<<
18303  * _err(MemoryError, NULL)
18304  *
18305  */
18306  __Pyx_TraceLine(1225,1,__PYX_ERR(1, 1225, __pyx_L1_error))
18307  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
18308  if (__pyx_t_2) {
18309 
18310  /* "View.MemoryView":1226
18311  * result = malloc(size)
18312  * if not result:
18313  * _err(MemoryError, NULL) # <<<<<<<<<<<<<<
18314  *
18315  *
18316  */
18317  __Pyx_TraceLine(1226,1,__PYX_ERR(1, 1226, __pyx_L1_error))
18318  __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1226, __pyx_L1_error)
18319 
18320  /* "View.MemoryView":1225
18321  *
18322  * result = malloc(size)
18323  * if not result: # <<<<<<<<<<<<<<
18324  * _err(MemoryError, NULL)
18325  *
18326  */
18327  }
18328 
18329  /* "View.MemoryView":1229
18330  *
18331  *
18332  * tmpslice.data = <char *> result # <<<<<<<<<<<<<<
18333  * tmpslice.memview = src.memview
18334  * for i in range(ndim):
18335  */
18336  __Pyx_TraceLine(1229,1,__PYX_ERR(1, 1229, __pyx_L1_error))
18337  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
18338 
18339  /* "View.MemoryView":1230
18340  *
18341  * tmpslice.data = <char *> result
18342  * tmpslice.memview = src.memview # <<<<<<<<<<<<<<
18343  * for i in range(ndim):
18344  * tmpslice.shape[i] = src.shape[i]
18345  */
18346  __Pyx_TraceLine(1230,1,__PYX_ERR(1, 1230, __pyx_L1_error))
18347  __pyx_t_4 = __pyx_v_src->memview;
18348  __pyx_v_tmpslice->memview = __pyx_t_4;
18349 
18350  /* "View.MemoryView":1231
18351  * tmpslice.data = <char *> result
18352  * tmpslice.memview = src.memview
18353  * for i in range(ndim): # <<<<<<<<<<<<<<
18354  * tmpslice.shape[i] = src.shape[i]
18355  * tmpslice.suboffsets[i] = -1
18356  */
18357  __Pyx_TraceLine(1231,1,__PYX_ERR(1, 1231, __pyx_L1_error))
18358  __pyx_t_3 = __pyx_v_ndim;
18359  __pyx_t_5 = __pyx_t_3;
18360  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
18361  __pyx_v_i = __pyx_t_6;
18362 
18363  /* "View.MemoryView":1232
18364  * tmpslice.memview = src.memview
18365  * for i in range(ndim):
18366  * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
18367  * tmpslice.suboffsets[i] = -1
18368  *
18369  */
18370  __Pyx_TraceLine(1232,1,__PYX_ERR(1, 1232, __pyx_L1_error))
18371  (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
18372 
18373  /* "View.MemoryView":1233
18374  * for i in range(ndim):
18375  * tmpslice.shape[i] = src.shape[i]
18376  * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
18377  *
18378  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
18379  */
18380  __Pyx_TraceLine(1233,1,__PYX_ERR(1, 1233, __pyx_L1_error))
18381  (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
18382  }
18383 
18384  /* "View.MemoryView":1235
18385  * tmpslice.suboffsets[i] = -1
18386  *
18387  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<<
18388  * ndim, order)
18389  *
18390  */
18391  __Pyx_TraceLine(1235,1,__PYX_ERR(1, 1235, __pyx_L1_error))
18392  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
18393 
18394  /* "View.MemoryView":1239
18395  *
18396  *
18397  * for i in range(ndim): # <<<<<<<<<<<<<<
18398  * if tmpslice.shape[i] == 1:
18399  * tmpslice.strides[i] = 0
18400  */
18401  __Pyx_TraceLine(1239,1,__PYX_ERR(1, 1239, __pyx_L1_error))
18402  __pyx_t_3 = __pyx_v_ndim;
18403  __pyx_t_5 = __pyx_t_3;
18404  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
18405  __pyx_v_i = __pyx_t_6;
18406 
18407  /* "View.MemoryView":1240
18408  *
18409  * for i in range(ndim):
18410  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
18411  * tmpslice.strides[i] = 0
18412  *
18413  */
18414  __Pyx_TraceLine(1240,1,__PYX_ERR(1, 1240, __pyx_L1_error))
18415  __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
18416  if (__pyx_t_2) {
18417 
18418  /* "View.MemoryView":1241
18419  * for i in range(ndim):
18420  * if tmpslice.shape[i] == 1:
18421  * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
18422  *
18423  * if slice_is_contig(src[0], order, ndim):
18424  */
18425  __Pyx_TraceLine(1241,1,__PYX_ERR(1, 1241, __pyx_L1_error))
18426  (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
18427 
18428  /* "View.MemoryView":1240
18429  *
18430  * for i in range(ndim):
18431  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
18432  * tmpslice.strides[i] = 0
18433  *
18434  */
18435  }
18436  }
18437 
18438  /* "View.MemoryView":1243
18439  * tmpslice.strides[i] = 0
18440  *
18441  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
18442  * memcpy(result, src.data, size)
18443  * else:
18444  */
18445  __Pyx_TraceLine(1243,1,__PYX_ERR(1, 1243, __pyx_L1_error))
18446  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
18447  if (__pyx_t_2) {
18448 
18449  /* "View.MemoryView":1244
18450  *
18451  * if slice_is_contig(src[0], order, ndim):
18452  * memcpy(result, src.data, size) # <<<<<<<<<<<<<<
18453  * else:
18454  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
18455  */
18456  __Pyx_TraceLine(1244,1,__PYX_ERR(1, 1244, __pyx_L1_error))
18457  (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
18458 
18459  /* "View.MemoryView":1243
18460  * tmpslice.strides[i] = 0
18461  *
18462  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
18463  * memcpy(result, src.data, size)
18464  * else:
18465  */
18466  goto __pyx_L9;
18467  }
18468 
18469  /* "View.MemoryView":1246
18470  * memcpy(result, src.data, size)
18471  * else:
18472  * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
18473  *
18474  * return result
18475  */
18476  __Pyx_TraceLine(1246,1,__PYX_ERR(1, 1246, __pyx_L1_error))
18477  /*else*/ {
18478  copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
18479  }
18480  __pyx_L9:;
18481 
18482  /* "View.MemoryView":1248
18483  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
18484  *
18485  * return result # <<<<<<<<<<<<<<
18486  *
18487  *
18488  */
18489  __Pyx_TraceLine(1248,1,__PYX_ERR(1, 1248, __pyx_L1_error))
18490  __pyx_r = __pyx_v_result;
18491  goto __pyx_L0;
18492 
18493  /* "View.MemoryView":1210
18494  *
18495  * @cname('__pyx_memoryview_copy_data_to_temp')
18496  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
18497  * __Pyx_memviewslice *tmpslice,
18498  * char order,
18499  */
18500 
18501  /* function exit code */
18502  __pyx_L1_error:;
18503  {
18504  #ifdef WITH_THREAD
18505  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18506  #endif
18507  __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
18508  #ifdef WITH_THREAD
18509  __Pyx_PyGILState_Release(__pyx_gilstate_save);
18510  #endif
18511  }
18512  __pyx_r = NULL;
18513  __pyx_L0:;
18514  __Pyx_TraceReturn(Py_None, 1);
18515  return __pyx_r;
18516 }
18517 
18518 /* "View.MemoryView":1253
18519  *
18520  * @cname('__pyx_memoryview_err_extents')
18521  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
18522  * Py_ssize_t extent2) except -1 with gil:
18523  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
18524  */
18525 
18526 static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
18527  int __pyx_r;
18528  __Pyx_TraceDeclarations
18529  __Pyx_RefNannyDeclarations
18530  PyObject *__pyx_t_1 = NULL;
18531  PyObject *__pyx_t_2 = NULL;
18532  PyObject *__pyx_t_3 = NULL;
18533  PyObject *__pyx_t_4 = NULL;
18534  int __pyx_lineno = 0;
18535  const char *__pyx_filename = NULL;
18536  int __pyx_clineno = 0;
18537  #ifdef WITH_THREAD
18538  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18539  #endif
18540  __Pyx_RefNannySetupContext("_err_extents", 0);
18541  __Pyx_TraceCall("_err_extents", __pyx_f[1], 1253, 0, __PYX_ERR(1, 1253, __pyx_L1_error));
18542 
18543  /* "View.MemoryView":1256
18544  * Py_ssize_t extent2) except -1 with gil:
18545  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
18546  * (i, extent1, extent2)) # <<<<<<<<<<<<<<
18547  *
18548  * @cname('__pyx_memoryview_err_dim')
18549  */
18550  __Pyx_TraceLine(1256,0,__PYX_ERR(1, 1256, __pyx_L1_error))
18551  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1256, __pyx_L1_error)
18552  __Pyx_GOTREF(__pyx_t_1);
18553  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1256, __pyx_L1_error)
18554  __Pyx_GOTREF(__pyx_t_2);
18555  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1256, __pyx_L1_error)
18556  __Pyx_GOTREF(__pyx_t_3);
18557  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1256, __pyx_L1_error)
18558  __Pyx_GOTREF(__pyx_t_4);
18559  __Pyx_GIVEREF(__pyx_t_1);
18560  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
18561  __Pyx_GIVEREF(__pyx_t_2);
18562  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
18563  __Pyx_GIVEREF(__pyx_t_3);
18564  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
18565  __pyx_t_1 = 0;
18566  __pyx_t_2 = 0;
18567  __pyx_t_3 = 0;
18568 
18569  /* "View.MemoryView":1255
18570  * cdef int _err_extents(int i, Py_ssize_t extent1,
18571  * Py_ssize_t extent2) except -1 with gil:
18572  * raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<<
18573  * (i, extent1, extent2))
18574  *
18575  */
18576  __Pyx_TraceLine(1255,0,__PYX_ERR(1, 1255, __pyx_L1_error))
18577  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1255, __pyx_L1_error)
18578  __Pyx_GOTREF(__pyx_t_3);
18579  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18580  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1255, __pyx_L1_error)
18581  __Pyx_GOTREF(__pyx_t_4);
18582  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18583  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
18584  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18585  __PYX_ERR(1, 1255, __pyx_L1_error)
18586 
18587  /* "View.MemoryView":1253
18588  *
18589  * @cname('__pyx_memoryview_err_extents')
18590  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
18591  * Py_ssize_t extent2) except -1 with gil:
18592  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
18593  */
18594 
18595  /* function exit code */
18596  __pyx_L1_error:;
18597  __Pyx_XDECREF(__pyx_t_1);
18598  __Pyx_XDECREF(__pyx_t_2);
18599  __Pyx_XDECREF(__pyx_t_3);
18600  __Pyx_XDECREF(__pyx_t_4);
18601  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
18602  __pyx_r = -1;
18603  __Pyx_TraceReturn(Py_None, 0);
18604  __Pyx_RefNannyFinishContext();
18605  #ifdef WITH_THREAD
18606  __Pyx_PyGILState_Release(__pyx_gilstate_save);
18607  #endif
18608  return __pyx_r;
18609 }
18610 
18611 /* "View.MemoryView":1259
18612  *
18613  * @cname('__pyx_memoryview_err_dim')
18614  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
18615  * raise error(msg.decode('ascii') % dim)
18616  *
18617  */
18618 
18619 static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
18620  int __pyx_r;
18621  __Pyx_TraceDeclarations
18622  __Pyx_RefNannyDeclarations
18623  PyObject *__pyx_t_1 = NULL;
18624  PyObject *__pyx_t_2 = NULL;
18625  PyObject *__pyx_t_3 = NULL;
18626  PyObject *__pyx_t_4 = NULL;
18627  int __pyx_lineno = 0;
18628  const char *__pyx_filename = NULL;
18629  int __pyx_clineno = 0;
18630  #ifdef WITH_THREAD
18631  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18632  #endif
18633  __Pyx_RefNannySetupContext("_err_dim", 0);
18634  __Pyx_TraceCall("_err_dim", __pyx_f[1], 1259, 0, __PYX_ERR(1, 1259, __pyx_L1_error));
18635  __Pyx_INCREF(__pyx_v_error);
18636 
18637  /* "View.MemoryView":1260
18638  * @cname('__pyx_memoryview_err_dim')
18639  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
18640  * raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<<
18641  *
18642  * @cname('__pyx_memoryview_err')
18643  */
18644  __Pyx_TraceLine(1260,0,__PYX_ERR(1, 1260, __pyx_L1_error))
18645  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1260, __pyx_L1_error)
18646  __Pyx_GOTREF(__pyx_t_2);
18647  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1260, __pyx_L1_error)
18648  __Pyx_GOTREF(__pyx_t_3);
18649  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1260, __pyx_L1_error)
18650  __Pyx_GOTREF(__pyx_t_4);
18651  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18652  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18653  __Pyx_INCREF(__pyx_v_error);
18654  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
18655  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
18656  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
18657  if (likely(__pyx_t_2)) {
18658  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
18659  __Pyx_INCREF(__pyx_t_2);
18660  __Pyx_INCREF(function);
18661  __Pyx_DECREF_SET(__pyx_t_3, function);
18662  }
18663  }
18664  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
18665  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
18666  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18667  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1260, __pyx_L1_error)
18668  __Pyx_GOTREF(__pyx_t_1);
18669  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18670  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
18671  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18672  __PYX_ERR(1, 1260, __pyx_L1_error)
18673 
18674  /* "View.MemoryView":1259
18675  *
18676  * @cname('__pyx_memoryview_err_dim')
18677  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
18678  * raise error(msg.decode('ascii') % dim)
18679  *
18680  */
18681 
18682  /* function exit code */
18683  __pyx_L1_error:;
18684  __Pyx_XDECREF(__pyx_t_1);
18685  __Pyx_XDECREF(__pyx_t_2);
18686  __Pyx_XDECREF(__pyx_t_3);
18687  __Pyx_XDECREF(__pyx_t_4);
18688  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
18689  __pyx_r = -1;
18690  __Pyx_XDECREF(__pyx_v_error);
18691  __Pyx_TraceReturn(Py_None, 0);
18692  __Pyx_RefNannyFinishContext();
18693  #ifdef WITH_THREAD
18694  __Pyx_PyGILState_Release(__pyx_gilstate_save);
18695  #endif
18696  return __pyx_r;
18697 }
18698 
18699 /* "View.MemoryView":1263
18700  *
18701  * @cname('__pyx_memoryview_err')
18702  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
18703  * if msg != NULL:
18704  * raise error(msg.decode('ascii'))
18705  */
18706 
18707 static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
18708  int __pyx_r;
18709  __Pyx_TraceDeclarations
18710  __Pyx_RefNannyDeclarations
18711  int __pyx_t_1;
18712  PyObject *__pyx_t_2 = NULL;
18713  PyObject *__pyx_t_3 = NULL;
18714  PyObject *__pyx_t_4 = NULL;
18715  PyObject *__pyx_t_5 = NULL;
18716  int __pyx_lineno = 0;
18717  const char *__pyx_filename = NULL;
18718  int __pyx_clineno = 0;
18719  #ifdef WITH_THREAD
18720  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
18721  #endif
18722  __Pyx_RefNannySetupContext("_err", 0);
18723  __Pyx_TraceCall("_err", __pyx_f[1], 1263, 0, __PYX_ERR(1, 1263, __pyx_L1_error));
18724  __Pyx_INCREF(__pyx_v_error);
18725 
18726  /* "View.MemoryView":1264
18727  * @cname('__pyx_memoryview_err')
18728  * cdef int _err(object error, char *msg) except -1 with gil:
18729  * if msg != NULL: # <<<<<<<<<<<<<<
18730  * raise error(msg.decode('ascii'))
18731  * else:
18732  */
18733  __Pyx_TraceLine(1264,0,__PYX_ERR(1, 1264, __pyx_L1_error))
18734  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
18735  if (unlikely(__pyx_t_1)) {
18736 
18737  /* "View.MemoryView":1265
18738  * cdef int _err(object error, char *msg) except -1 with gil:
18739  * if msg != NULL:
18740  * raise error(msg.decode('ascii')) # <<<<<<<<<<<<<<
18741  * else:
18742  * raise error
18743  */
18744  __Pyx_TraceLine(1265,0,__PYX_ERR(1, 1265, __pyx_L1_error))
18745  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1265, __pyx_L1_error)
18746  __Pyx_GOTREF(__pyx_t_3);
18747  __Pyx_INCREF(__pyx_v_error);
18748  __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
18749  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
18750  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
18751  if (likely(__pyx_t_5)) {
18752  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18753  __Pyx_INCREF(__pyx_t_5);
18754  __Pyx_INCREF(function);
18755  __Pyx_DECREF_SET(__pyx_t_4, function);
18756  }
18757  }
18758  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
18759  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18760  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18761  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1265, __pyx_L1_error)
18762  __Pyx_GOTREF(__pyx_t_2);
18763  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18764  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
18765  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18766  __PYX_ERR(1, 1265, __pyx_L1_error)
18767 
18768  /* "View.MemoryView":1264
18769  * @cname('__pyx_memoryview_err')
18770  * cdef int _err(object error, char *msg) except -1 with gil:
18771  * if msg != NULL: # <<<<<<<<<<<<<<
18772  * raise error(msg.decode('ascii'))
18773  * else:
18774  */
18775  }
18776 
18777  /* "View.MemoryView":1267
18778  * raise error(msg.decode('ascii'))
18779  * else:
18780  * raise error # <<<<<<<<<<<<<<
18781  *
18782  * @cname('__pyx_memoryview_copy_contents')
18783  */
18784  __Pyx_TraceLine(1267,0,__PYX_ERR(1, 1267, __pyx_L1_error))
18785  /*else*/ {
18786  __Pyx_Raise(__pyx_v_error, 0, 0, 0);
18787  __PYX_ERR(1, 1267, __pyx_L1_error)
18788  }
18789 
18790  /* "View.MemoryView":1263
18791  *
18792  * @cname('__pyx_memoryview_err')
18793  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
18794  * if msg != NULL:
18795  * raise error(msg.decode('ascii'))
18796  */
18797 
18798  /* function exit code */
18799  __pyx_L1_error:;
18800  __Pyx_XDECREF(__pyx_t_2);
18801  __Pyx_XDECREF(__pyx_t_3);
18802  __Pyx_XDECREF(__pyx_t_4);
18803  __Pyx_XDECREF(__pyx_t_5);
18804  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
18805  __pyx_r = -1;
18806  __Pyx_XDECREF(__pyx_v_error);
18807  __Pyx_TraceReturn(Py_None, 0);
18808  __Pyx_RefNannyFinishContext();
18809  #ifdef WITH_THREAD
18810  __Pyx_PyGILState_Release(__pyx_gilstate_save);
18811  #endif
18812  return __pyx_r;
18813 }
18814 
18815 /* "View.MemoryView":1270
18816  *
18817  * @cname('__pyx_memoryview_copy_contents')
18818  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
18819  * __Pyx_memviewslice dst,
18820  * int src_ndim, int dst_ndim,
18821  */
18822 
18823 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
18824  void *__pyx_v_tmpdata;
18825  size_t __pyx_v_itemsize;
18826  int __pyx_v_i;
18827  char __pyx_v_order;
18828  int __pyx_v_broadcasting;
18829  int __pyx_v_direct_copy;
18830  __Pyx_memviewslice __pyx_v_tmp;
18831  int __pyx_v_ndim;
18832  int __pyx_r;
18833  __Pyx_TraceDeclarations
18834  Py_ssize_t __pyx_t_1;
18835  int __pyx_t_2;
18836  int __pyx_t_3;
18837  int __pyx_t_4;
18838  int __pyx_t_5;
18839  int __pyx_t_6;
18840  void *__pyx_t_7;
18841  int __pyx_t_8;
18842  int __pyx_lineno = 0;
18843  const char *__pyx_filename = NULL;
18844  int __pyx_clineno = 0;
18845  __Pyx_TraceCall("memoryview_copy_contents", __pyx_f[1], 1270, 1, __PYX_ERR(1, 1270, __pyx_L1_error));
18846 
18847  /* "View.MemoryView":1278
18848  * Check for overlapping memory and verify the shapes.
18849  * """
18850  * cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
18851  * cdef size_t itemsize = src.memview.view.itemsize
18852  * cdef int i
18853  */
18854  __Pyx_TraceLine(1278,1,__PYX_ERR(1, 1278, __pyx_L1_error))
18855  __pyx_v_tmpdata = NULL;
18856 
18857  /* "View.MemoryView":1279
18858  * """
18859  * cdef void *tmpdata = NULL
18860  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
18861  * cdef int i
18862  * cdef char order = get_best_order(&src, src_ndim)
18863  */
18864  __Pyx_TraceLine(1279,1,__PYX_ERR(1, 1279, __pyx_L1_error))
18865  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
18866  __pyx_v_itemsize = __pyx_t_1;
18867 
18868  /* "View.MemoryView":1281
18869  * cdef size_t itemsize = src.memview.view.itemsize
18870  * cdef int i
18871  * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
18872  * cdef bint broadcasting = False
18873  * cdef bint direct_copy = False
18874  */
18875  __Pyx_TraceLine(1281,1,__PYX_ERR(1, 1281, __pyx_L1_error))
18876  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
18877 
18878  /* "View.MemoryView":1282
18879  * cdef int i
18880  * cdef char order = get_best_order(&src, src_ndim)
18881  * cdef bint broadcasting = False # <<<<<<<<<<<<<<
18882  * cdef bint direct_copy = False
18883  * cdef __Pyx_memviewslice tmp
18884  */
18885  __Pyx_TraceLine(1282,1,__PYX_ERR(1, 1282, __pyx_L1_error))
18886  __pyx_v_broadcasting = 0;
18887 
18888  /* "View.MemoryView":1283
18889  * cdef char order = get_best_order(&src, src_ndim)
18890  * cdef bint broadcasting = False
18891  * cdef bint direct_copy = False # <<<<<<<<<<<<<<
18892  * cdef __Pyx_memviewslice tmp
18893  *
18894  */
18895  __Pyx_TraceLine(1283,1,__PYX_ERR(1, 1283, __pyx_L1_error))
18896  __pyx_v_direct_copy = 0;
18897 
18898  /* "View.MemoryView":1286
18899  * cdef __Pyx_memviewslice tmp
18900  *
18901  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
18902  * broadcast_leading(&src, src_ndim, dst_ndim)
18903  * elif dst_ndim < src_ndim:
18904  */
18905  __Pyx_TraceLine(1286,1,__PYX_ERR(1, 1286, __pyx_L1_error))
18906  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
18907  if (__pyx_t_2) {
18908 
18909  /* "View.MemoryView":1287
18910  *
18911  * if src_ndim < dst_ndim:
18912  * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
18913  * elif dst_ndim < src_ndim:
18914  * broadcast_leading(&dst, dst_ndim, src_ndim)
18915  */
18916  __Pyx_TraceLine(1287,1,__PYX_ERR(1, 1287, __pyx_L1_error))
18917  __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
18918 
18919  /* "View.MemoryView":1286
18920  * cdef __Pyx_memviewslice tmp
18921  *
18922  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
18923  * broadcast_leading(&src, src_ndim, dst_ndim)
18924  * elif dst_ndim < src_ndim:
18925  */
18926  goto __pyx_L3;
18927  }
18928 
18929  /* "View.MemoryView":1288
18930  * if src_ndim < dst_ndim:
18931  * broadcast_leading(&src, src_ndim, dst_ndim)
18932  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
18933  * broadcast_leading(&dst, dst_ndim, src_ndim)
18934  *
18935  */
18936  __Pyx_TraceLine(1288,1,__PYX_ERR(1, 1288, __pyx_L1_error))
18937  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
18938  if (__pyx_t_2) {
18939 
18940  /* "View.MemoryView":1289
18941  * broadcast_leading(&src, src_ndim, dst_ndim)
18942  * elif dst_ndim < src_ndim:
18943  * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
18944  *
18945  * cdef int ndim = max(src_ndim, dst_ndim)
18946  */
18947  __Pyx_TraceLine(1289,1,__PYX_ERR(1, 1289, __pyx_L1_error))
18948  __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
18949 
18950  /* "View.MemoryView":1288
18951  * if src_ndim < dst_ndim:
18952  * broadcast_leading(&src, src_ndim, dst_ndim)
18953  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
18954  * broadcast_leading(&dst, dst_ndim, src_ndim)
18955  *
18956  */
18957  }
18958  __pyx_L3:;
18959 
18960  /* "View.MemoryView":1291
18961  * broadcast_leading(&dst, dst_ndim, src_ndim)
18962  *
18963  * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
18964  *
18965  * for i in range(ndim):
18966  */
18967  __Pyx_TraceLine(1291,1,__PYX_ERR(1, 1291, __pyx_L1_error))
18968  __pyx_t_3 = __pyx_v_dst_ndim;
18969  __pyx_t_4 = __pyx_v_src_ndim;
18970  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
18971  __pyx_t_5 = __pyx_t_3;
18972  } else {
18973  __pyx_t_5 = __pyx_t_4;
18974  }
18975  __pyx_v_ndim = __pyx_t_5;
18976 
18977  /* "View.MemoryView":1293
18978  * cdef int ndim = max(src_ndim, dst_ndim)
18979  *
18980  * for i in range(ndim): # <<<<<<<<<<<<<<
18981  * if src.shape[i] != dst.shape[i]:
18982  * if src.shape[i] == 1:
18983  */
18984  __Pyx_TraceLine(1293,1,__PYX_ERR(1, 1293, __pyx_L1_error))
18985  __pyx_t_5 = __pyx_v_ndim;
18986  __pyx_t_3 = __pyx_t_5;
18987  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
18988  __pyx_v_i = __pyx_t_4;
18989 
18990  /* "View.MemoryView":1294
18991  *
18992  * for i in range(ndim):
18993  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
18994  * if src.shape[i] == 1:
18995  * broadcasting = True
18996  */
18997  __Pyx_TraceLine(1294,1,__PYX_ERR(1, 1294, __pyx_L1_error))
18998  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
18999  if (__pyx_t_2) {
19000 
19001  /* "View.MemoryView":1295
19002  * for i in range(ndim):
19003  * if src.shape[i] != dst.shape[i]:
19004  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
19005  * broadcasting = True
19006  * src.strides[i] = 0
19007  */
19008  __Pyx_TraceLine(1295,1,__PYX_ERR(1, 1295, __pyx_L1_error))
19009  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
19010  if (__pyx_t_2) {
19011 
19012  /* "View.MemoryView":1296
19013  * if src.shape[i] != dst.shape[i]:
19014  * if src.shape[i] == 1:
19015  * broadcasting = True # <<<<<<<<<<<<<<
19016  * src.strides[i] = 0
19017  * else:
19018  */
19019  __Pyx_TraceLine(1296,1,__PYX_ERR(1, 1296, __pyx_L1_error))
19020  __pyx_v_broadcasting = 1;
19021 
19022  /* "View.MemoryView":1297
19023  * if src.shape[i] == 1:
19024  * broadcasting = True
19025  * src.strides[i] = 0 # <<<<<<<<<<<<<<
19026  * else:
19027  * _err_extents(i, dst.shape[i], src.shape[i])
19028  */
19029  __Pyx_TraceLine(1297,1,__PYX_ERR(1, 1297, __pyx_L1_error))
19030  (__pyx_v_src.strides[__pyx_v_i]) = 0;
19031 
19032  /* "View.MemoryView":1295
19033  * for i in range(ndim):
19034  * if src.shape[i] != dst.shape[i]:
19035  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
19036  * broadcasting = True
19037  * src.strides[i] = 0
19038  */
19039  goto __pyx_L7;
19040  }
19041 
19042  /* "View.MemoryView":1299
19043  * src.strides[i] = 0
19044  * else:
19045  * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
19046  *
19047  * if src.suboffsets[i] >= 0:
19048  */
19049  __Pyx_TraceLine(1299,1,__PYX_ERR(1, 1299, __pyx_L1_error))
19050  /*else*/ {
19051  __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1299, __pyx_L1_error)
19052  }
19053  __pyx_L7:;
19054 
19055  /* "View.MemoryView":1294
19056  *
19057  * for i in range(ndim):
19058  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
19059  * if src.shape[i] == 1:
19060  * broadcasting = True
19061  */
19062  }
19063 
19064  /* "View.MemoryView":1301
19065  * _err_extents(i, dst.shape[i], src.shape[i])
19066  *
19067  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
19068  * _err_dim(ValueError, "Dimension %d is not direct", i)
19069  *
19070  */
19071  __Pyx_TraceLine(1301,1,__PYX_ERR(1, 1301, __pyx_L1_error))
19072  __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
19073  if (__pyx_t_2) {
19074 
19075  /* "View.MemoryView":1302
19076  *
19077  * if src.suboffsets[i] >= 0:
19078  * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
19079  *
19080  * if slices_overlap(&src, &dst, ndim, itemsize):
19081  */
19082  __Pyx_TraceLine(1302,1,__PYX_ERR(1, 1302, __pyx_L1_error))
19083  __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1302, __pyx_L1_error)
19084 
19085  /* "View.MemoryView":1301
19086  * _err_extents(i, dst.shape[i], src.shape[i])
19087  *
19088  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
19089  * _err_dim(ValueError, "Dimension %d is not direct", i)
19090  *
19091  */
19092  }
19093  }
19094 
19095  /* "View.MemoryView":1304
19096  * _err_dim(ValueError, "Dimension %d is not direct", i)
19097  *
19098  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
19099  *
19100  * if not slice_is_contig(src, order, ndim):
19101  */
19102  __Pyx_TraceLine(1304,1,__PYX_ERR(1, 1304, __pyx_L1_error))
19103  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
19104  if (__pyx_t_2) {
19105 
19106  /* "View.MemoryView":1306
19107  * if slices_overlap(&src, &dst, ndim, itemsize):
19108  *
19109  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
19110  * order = get_best_order(&dst, ndim)
19111  *
19112  */
19113  __Pyx_TraceLine(1306,1,__PYX_ERR(1, 1306, __pyx_L1_error))
19114  __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
19115  if (__pyx_t_2) {
19116 
19117  /* "View.MemoryView":1307
19118  *
19119  * if not slice_is_contig(src, order, ndim):
19120  * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
19121  *
19122  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
19123  */
19124  __Pyx_TraceLine(1307,1,__PYX_ERR(1, 1307, __pyx_L1_error))
19125  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
19126 
19127  /* "View.MemoryView":1306
19128  * if slices_overlap(&src, &dst, ndim, itemsize):
19129  *
19130  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
19131  * order = get_best_order(&dst, ndim)
19132  *
19133  */
19134  }
19135 
19136  /* "View.MemoryView":1309
19137  * order = get_best_order(&dst, ndim)
19138  *
19139  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
19140  * src = tmp
19141  *
19142  */
19143  __Pyx_TraceLine(1309,1,__PYX_ERR(1, 1309, __pyx_L1_error))
19144  __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1309, __pyx_L1_error)
19145  __pyx_v_tmpdata = __pyx_t_7;
19146 
19147  /* "View.MemoryView":1310
19148  *
19149  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
19150  * src = tmp # <<<<<<<<<<<<<<
19151  *
19152  * if not broadcasting:
19153  */
19154  __Pyx_TraceLine(1310,1,__PYX_ERR(1, 1310, __pyx_L1_error))
19155  __pyx_v_src = __pyx_v_tmp;
19156 
19157  /* "View.MemoryView":1304
19158  * _err_dim(ValueError, "Dimension %d is not direct", i)
19159  *
19160  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
19161  *
19162  * if not slice_is_contig(src, order, ndim):
19163  */
19164  }
19165 
19166  /* "View.MemoryView":1312
19167  * src = tmp
19168  *
19169  * if not broadcasting: # <<<<<<<<<<<<<<
19170  *
19171  *
19172  */
19173  __Pyx_TraceLine(1312,1,__PYX_ERR(1, 1312, __pyx_L1_error))
19174  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
19175  if (__pyx_t_2) {
19176 
19177  /* "View.MemoryView":1315
19178  *
19179  *
19180  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
19181  * direct_copy = slice_is_contig(dst, 'C', ndim)
19182  * elif slice_is_contig(src, 'F', ndim):
19183  */
19184  __Pyx_TraceLine(1315,1,__PYX_ERR(1, 1315, __pyx_L1_error))
19185  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
19186  if (__pyx_t_2) {
19187 
19188  /* "View.MemoryView":1316
19189  *
19190  * if slice_is_contig(src, 'C', ndim):
19191  * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
19192  * elif slice_is_contig(src, 'F', ndim):
19193  * direct_copy = slice_is_contig(dst, 'F', ndim)
19194  */
19195  __Pyx_TraceLine(1316,1,__PYX_ERR(1, 1316, __pyx_L1_error))
19196  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
19197 
19198  /* "View.MemoryView":1315
19199  *
19200  *
19201  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
19202  * direct_copy = slice_is_contig(dst, 'C', ndim)
19203  * elif slice_is_contig(src, 'F', ndim):
19204  */
19205  goto __pyx_L12;
19206  }
19207 
19208  /* "View.MemoryView":1317
19209  * if slice_is_contig(src, 'C', ndim):
19210  * direct_copy = slice_is_contig(dst, 'C', ndim)
19211  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
19212  * direct_copy = slice_is_contig(dst, 'F', ndim)
19213  *
19214  */
19215  __Pyx_TraceLine(1317,1,__PYX_ERR(1, 1317, __pyx_L1_error))
19216  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
19217  if (__pyx_t_2) {
19218 
19219  /* "View.MemoryView":1318
19220  * direct_copy = slice_is_contig(dst, 'C', ndim)
19221  * elif slice_is_contig(src, 'F', ndim):
19222  * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
19223  *
19224  * if direct_copy:
19225  */
19226  __Pyx_TraceLine(1318,1,__PYX_ERR(1, 1318, __pyx_L1_error))
19227  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
19228 
19229  /* "View.MemoryView":1317
19230  * if slice_is_contig(src, 'C', ndim):
19231  * direct_copy = slice_is_contig(dst, 'C', ndim)
19232  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
19233  * direct_copy = slice_is_contig(dst, 'F', ndim)
19234  *
19235  */
19236  }
19237  __pyx_L12:;
19238 
19239  /* "View.MemoryView":1320
19240  * direct_copy = slice_is_contig(dst, 'F', ndim)
19241  *
19242  * if direct_copy: # <<<<<<<<<<<<<<
19243  *
19244  * refcount_copying(&dst, dtype_is_object, ndim, False)
19245  */
19246  __Pyx_TraceLine(1320,1,__PYX_ERR(1, 1320, __pyx_L1_error))
19247  __pyx_t_2 = (__pyx_v_direct_copy != 0);
19248  if (__pyx_t_2) {
19249 
19250  /* "View.MemoryView":1322
19251  * if direct_copy:
19252  *
19253  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
19254  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
19255  * refcount_copying(&dst, dtype_is_object, ndim, True)
19256  */
19257  __Pyx_TraceLine(1322,1,__PYX_ERR(1, 1322, __pyx_L1_error))
19258  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
19259 
19260  /* "View.MemoryView":1323
19261  *
19262  * refcount_copying(&dst, dtype_is_object, ndim, False)
19263  * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
19264  * refcount_copying(&dst, dtype_is_object, ndim, True)
19265  * free(tmpdata)
19266  */
19267  __Pyx_TraceLine(1323,1,__PYX_ERR(1, 1323, __pyx_L1_error))
19268  (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
19269 
19270  /* "View.MemoryView":1324
19271  * refcount_copying(&dst, dtype_is_object, ndim, False)
19272  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
19273  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
19274  * free(tmpdata)
19275  * return 0
19276  */
19277  __Pyx_TraceLine(1324,1,__PYX_ERR(1, 1324, __pyx_L1_error))
19278  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
19279 
19280  /* "View.MemoryView":1325
19281  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
19282  * refcount_copying(&dst, dtype_is_object, ndim, True)
19283  * free(tmpdata) # <<<<<<<<<<<<<<
19284  * return 0
19285  *
19286  */
19287  __Pyx_TraceLine(1325,1,__PYX_ERR(1, 1325, __pyx_L1_error))
19288  free(__pyx_v_tmpdata);
19289 
19290  /* "View.MemoryView":1326
19291  * refcount_copying(&dst, dtype_is_object, ndim, True)
19292  * free(tmpdata)
19293  * return 0 # <<<<<<<<<<<<<<
19294  *
19295  * if order == 'F' == get_best_order(&dst, ndim):
19296  */
19297  __Pyx_TraceLine(1326,1,__PYX_ERR(1, 1326, __pyx_L1_error))
19298  __pyx_r = 0;
19299  goto __pyx_L0;
19300 
19301  /* "View.MemoryView":1320
19302  * direct_copy = slice_is_contig(dst, 'F', ndim)
19303  *
19304  * if direct_copy: # <<<<<<<<<<<<<<
19305  *
19306  * refcount_copying(&dst, dtype_is_object, ndim, False)
19307  */
19308  }
19309 
19310  /* "View.MemoryView":1312
19311  * src = tmp
19312  *
19313  * if not broadcasting: # <<<<<<<<<<<<<<
19314  *
19315  *
19316  */
19317  }
19318 
19319  /* "View.MemoryView":1328
19320  * return 0
19321  *
19322  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
19323  *
19324  *
19325  */
19326  __Pyx_TraceLine(1328,1,__PYX_ERR(1, 1328, __pyx_L1_error))
19327  __pyx_t_2 = (__pyx_v_order == 'F');
19328  if (__pyx_t_2) {
19329  __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
19330  }
19331  __pyx_t_8 = (__pyx_t_2 != 0);
19332  if (__pyx_t_8) {
19333 
19334  /* "View.MemoryView":1331
19335  *
19336  *
19337  * transpose_memslice(&src) # <<<<<<<<<<<<<<
19338  * transpose_memslice(&dst)
19339  *
19340  */
19341  __Pyx_TraceLine(1331,1,__PYX_ERR(1, 1331, __pyx_L1_error))
19342  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1331, __pyx_L1_error)
19343 
19344  /* "View.MemoryView":1332
19345  *
19346  * transpose_memslice(&src)
19347  * transpose_memslice(&dst) # <<<<<<<<<<<<<<
19348  *
19349  * refcount_copying(&dst, dtype_is_object, ndim, False)
19350  */
19351  __Pyx_TraceLine(1332,1,__PYX_ERR(1, 1332, __pyx_L1_error))
19352  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1332, __pyx_L1_error)
19353 
19354  /* "View.MemoryView":1328
19355  * return 0
19356  *
19357  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
19358  *
19359  *
19360  */
19361  }
19362 
19363  /* "View.MemoryView":1334
19364  * transpose_memslice(&dst)
19365  *
19366  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
19367  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
19368  * refcount_copying(&dst, dtype_is_object, ndim, True)
19369  */
19370  __Pyx_TraceLine(1334,1,__PYX_ERR(1, 1334, __pyx_L1_error))
19371  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
19372 
19373  /* "View.MemoryView":1335
19374  *
19375  * refcount_copying(&dst, dtype_is_object, ndim, False)
19376  * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
19377  * refcount_copying(&dst, dtype_is_object, ndim, True)
19378  *
19379  */
19380  __Pyx_TraceLine(1335,1,__PYX_ERR(1, 1335, __pyx_L1_error))
19381  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
19382 
19383  /* "View.MemoryView":1336
19384  * refcount_copying(&dst, dtype_is_object, ndim, False)
19385  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
19386  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
19387  *
19388  * free(tmpdata)
19389  */
19390  __Pyx_TraceLine(1336,1,__PYX_ERR(1, 1336, __pyx_L1_error))
19391  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
19392 
19393  /* "View.MemoryView":1338
19394  * refcount_copying(&dst, dtype_is_object, ndim, True)
19395  *
19396  * free(tmpdata) # <<<<<<<<<<<<<<
19397  * return 0
19398  *
19399  */
19400  __Pyx_TraceLine(1338,1,__PYX_ERR(1, 1338, __pyx_L1_error))
19401  free(__pyx_v_tmpdata);
19402 
19403  /* "View.MemoryView":1339
19404  *
19405  * free(tmpdata)
19406  * return 0 # <<<<<<<<<<<<<<
19407  *
19408  * @cname('__pyx_memoryview_broadcast_leading')
19409  */
19410  __Pyx_TraceLine(1339,1,__PYX_ERR(1, 1339, __pyx_L1_error))
19411  __pyx_r = 0;
19412  goto __pyx_L0;
19413 
19414  /* "View.MemoryView":1270
19415  *
19416  * @cname('__pyx_memoryview_copy_contents')
19417  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
19418  * __Pyx_memviewslice dst,
19419  * int src_ndim, int dst_ndim,
19420  */
19421 
19422  /* function exit code */
19423  __pyx_L1_error:;
19424  {
19425  #ifdef WITH_THREAD
19426  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
19427  #endif
19428  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
19429  #ifdef WITH_THREAD
19430  __Pyx_PyGILState_Release(__pyx_gilstate_save);
19431  #endif
19432  }
19433  __pyx_r = -1;
19434  __pyx_L0:;
19435  __Pyx_TraceReturn(Py_None, 1);
19436  return __pyx_r;
19437 }
19438 
19439 /* "View.MemoryView":1342
19440  *
19441  * @cname('__pyx_memoryview_broadcast_leading')
19442  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
19443  * int ndim,
19444  * int ndim_other) nogil:
19445  */
19446 
19447 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
19448  int __pyx_v_i;
19449  int __pyx_v_offset;
19450  __Pyx_TraceDeclarations
19451  int __pyx_t_1;
19452  int __pyx_t_2;
19453  int __pyx_t_3;
19454  int __pyx_lineno = 0;
19455  const char *__pyx_filename = NULL;
19456  int __pyx_clineno = 0;
19457  __Pyx_TraceCall("broadcast_leading", __pyx_f[1], 1342, 1, __PYX_ERR(1, 1342, __pyx_L1_error));
19458 
19459  /* "View.MemoryView":1346
19460  * int ndim_other) nogil:
19461  * cdef int i
19462  * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
19463  *
19464  * for i in range(ndim - 1, -1, -1):
19465  */
19466  __Pyx_TraceLine(1346,1,__PYX_ERR(1, 1346, __pyx_L1_error))
19467  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
19468 
19469  /* "View.MemoryView":1348
19470  * cdef int offset = ndim_other - ndim
19471  *
19472  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
19473  * mslice.shape[i + offset] = mslice.shape[i]
19474  * mslice.strides[i + offset] = mslice.strides[i]
19475  */
19476  __Pyx_TraceLine(1348,1,__PYX_ERR(1, 1348, __pyx_L1_error))
19477  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
19478  __pyx_v_i = __pyx_t_1;
19479 
19480  /* "View.MemoryView":1349
19481  *
19482  * for i in range(ndim - 1, -1, -1):
19483  * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
19484  * mslice.strides[i + offset] = mslice.strides[i]
19485  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
19486  */
19487  __Pyx_TraceLine(1349,1,__PYX_ERR(1, 1349, __pyx_L1_error))
19488  (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
19489 
19490  /* "View.MemoryView":1350
19491  * for i in range(ndim - 1, -1, -1):
19492  * mslice.shape[i + offset] = mslice.shape[i]
19493  * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
19494  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
19495  *
19496  */
19497  __Pyx_TraceLine(1350,1,__PYX_ERR(1, 1350, __pyx_L1_error))
19498  (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
19499 
19500  /* "View.MemoryView":1351
19501  * mslice.shape[i + offset] = mslice.shape[i]
19502  * mslice.strides[i + offset] = mslice.strides[i]
19503  * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
19504  *
19505  * for i in range(offset):
19506  */
19507  __Pyx_TraceLine(1351,1,__PYX_ERR(1, 1351, __pyx_L1_error))
19508  (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
19509  }
19510 
19511  /* "View.MemoryView":1353
19512  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
19513  *
19514  * for i in range(offset): # <<<<<<<<<<<<<<
19515  * mslice.shape[i] = 1
19516  * mslice.strides[i] = mslice.strides[0]
19517  */
19518  __Pyx_TraceLine(1353,1,__PYX_ERR(1, 1353, __pyx_L1_error))
19519  __pyx_t_1 = __pyx_v_offset;
19520  __pyx_t_2 = __pyx_t_1;
19521  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
19522  __pyx_v_i = __pyx_t_3;
19523 
19524  /* "View.MemoryView":1354
19525  *
19526  * for i in range(offset):
19527  * mslice.shape[i] = 1 # <<<<<<<<<<<<<<
19528  * mslice.strides[i] = mslice.strides[0]
19529  * mslice.suboffsets[i] = -1
19530  */
19531  __Pyx_TraceLine(1354,1,__PYX_ERR(1, 1354, __pyx_L1_error))
19532  (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
19533 
19534  /* "View.MemoryView":1355
19535  * for i in range(offset):
19536  * mslice.shape[i] = 1
19537  * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
19538  * mslice.suboffsets[i] = -1
19539  *
19540  */
19541  __Pyx_TraceLine(1355,1,__PYX_ERR(1, 1355, __pyx_L1_error))
19542  (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
19543 
19544  /* "View.MemoryView":1356
19545  * mslice.shape[i] = 1
19546  * mslice.strides[i] = mslice.strides[0]
19547  * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
19548  *
19549  *
19550  */
19551  __Pyx_TraceLine(1356,1,__PYX_ERR(1, 1356, __pyx_L1_error))
19552  (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
19553  }
19554 
19555  /* "View.MemoryView":1342
19556  *
19557  * @cname('__pyx_memoryview_broadcast_leading')
19558  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
19559  * int ndim,
19560  * int ndim_other) nogil:
19561  */
19562 
19563  /* function exit code */
19564  goto __pyx_L0;
19565  __pyx_L1_error:;
19566  __Pyx_WriteUnraisable("View.MemoryView.broadcast_leading", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
19567  __pyx_L0:;
19568  __Pyx_TraceReturn(Py_None, 1);
19569 }
19570 
19571 /* "View.MemoryView":1364
19572  *
19573  * @cname('__pyx_memoryview_refcount_copying')
19574  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
19575  * int ndim, bint inc) nogil:
19576  *
19577  */
19578 
19579 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
19580  __Pyx_TraceDeclarations
19581  int __pyx_t_1;
19582  int __pyx_lineno = 0;
19583  const char *__pyx_filename = NULL;
19584  int __pyx_clineno = 0;
19585  __Pyx_TraceCall("refcount_copying", __pyx_f[1], 1364, 1, __PYX_ERR(1, 1364, __pyx_L1_error));
19586 
19587  /* "View.MemoryView":1368
19588  *
19589  *
19590  * if dtype_is_object: # <<<<<<<<<<<<<<
19591  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
19592  * dst.strides, ndim, inc)
19593  */
19594  __Pyx_TraceLine(1368,1,__PYX_ERR(1, 1368, __pyx_L1_error))
19595  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
19596  if (__pyx_t_1) {
19597 
19598  /* "View.MemoryView":1369
19599  *
19600  * if dtype_is_object:
19601  * refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<<
19602  * dst.strides, ndim, inc)
19603  *
19604  */
19605  __Pyx_TraceLine(1369,1,__PYX_ERR(1, 1369, __pyx_L1_error))
19606  __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
19607 
19608  /* "View.MemoryView":1368
19609  *
19610  *
19611  * if dtype_is_object: # <<<<<<<<<<<<<<
19612  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
19613  * dst.strides, ndim, inc)
19614  */
19615  }
19616 
19617  /* "View.MemoryView":1364
19618  *
19619  * @cname('__pyx_memoryview_refcount_copying')
19620  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
19621  * int ndim, bint inc) nogil:
19622  *
19623  */
19624 
19625  /* function exit code */
19626  goto __pyx_L0;
19627  __pyx_L1_error:;
19628  __Pyx_WriteUnraisable("View.MemoryView.refcount_copying", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
19629  __pyx_L0:;
19630  __Pyx_TraceReturn(Py_None, 1);
19631 }
19632 
19633 /* "View.MemoryView":1373
19634  *
19635  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
19636  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19637  * Py_ssize_t *strides, int ndim,
19638  * bint inc) with gil:
19639  */
19640 
19641 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
19642  __Pyx_TraceDeclarations
19643  __Pyx_RefNannyDeclarations
19644  int __pyx_lineno = 0;
19645  const char *__pyx_filename = NULL;
19646  int __pyx_clineno = 0;
19647  #ifdef WITH_THREAD
19648  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
19649  #endif
19650  __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
19651  __Pyx_TraceCall("refcount_objects_in_slice_with_gil", __pyx_f[1], 1373, 0, __PYX_ERR(1, 1373, __pyx_L1_error));
19652 
19653  /* "View.MemoryView":1376
19654  * Py_ssize_t *strides, int ndim,
19655  * bint inc) with gil:
19656  * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
19657  *
19658  * @cname('__pyx_memoryview_refcount_objects_in_slice')
19659  */
19660  __Pyx_TraceLine(1376,0,__PYX_ERR(1, 1376, __pyx_L1_error))
19661  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
19662 
19663  /* "View.MemoryView":1373
19664  *
19665  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
19666  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19667  * Py_ssize_t *strides, int ndim,
19668  * bint inc) with gil:
19669  */
19670 
19671  /* function exit code */
19672  goto __pyx_L0;
19673  __pyx_L1_error:;
19674  __Pyx_WriteUnraisable("View.MemoryView.refcount_objects_in_slice_with_gil", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
19675  __pyx_L0:;
19676  __Pyx_TraceReturn(Py_None, 0);
19677  __Pyx_RefNannyFinishContext();
19678  #ifdef WITH_THREAD
19679  __Pyx_PyGILState_Release(__pyx_gilstate_save);
19680  #endif
19681 }
19682 
19683 /* "View.MemoryView":1379
19684  *
19685  * @cname('__pyx_memoryview_refcount_objects_in_slice')
19686  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19687  * Py_ssize_t *strides, int ndim, bint inc):
19688  * cdef Py_ssize_t i
19689  */
19690 
19691 static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
19692  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
19693  __Pyx_TraceDeclarations
19694  __Pyx_RefNannyDeclarations
19695  Py_ssize_t __pyx_t_1;
19696  Py_ssize_t __pyx_t_2;
19697  Py_ssize_t __pyx_t_3;
19698  int __pyx_t_4;
19699  int __pyx_lineno = 0;
19700  const char *__pyx_filename = NULL;
19701  int __pyx_clineno = 0;
19702  __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
19703  __Pyx_TraceCall("refcount_objects_in_slice", __pyx_f[1], 1379, 0, __PYX_ERR(1, 1379, __pyx_L1_error));
19704 
19705  /* "View.MemoryView":1383
19706  * cdef Py_ssize_t i
19707  *
19708  * for i in range(shape[0]): # <<<<<<<<<<<<<<
19709  * if ndim == 1:
19710  * if inc:
19711  */
19712  __Pyx_TraceLine(1383,0,__PYX_ERR(1, 1383, __pyx_L1_error))
19713  __pyx_t_1 = (__pyx_v_shape[0]);
19714  __pyx_t_2 = __pyx_t_1;
19715  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
19716  __pyx_v_i = __pyx_t_3;
19717 
19718  /* "View.MemoryView":1384
19719  *
19720  * for i in range(shape[0]):
19721  * if ndim == 1: # <<<<<<<<<<<<<<
19722  * if inc:
19723  * Py_INCREF((<PyObject **> data)[0])
19724  */
19725  __Pyx_TraceLine(1384,0,__PYX_ERR(1, 1384, __pyx_L1_error))
19726  __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
19727  if (__pyx_t_4) {
19728 
19729  /* "View.MemoryView":1385
19730  * for i in range(shape[0]):
19731  * if ndim == 1:
19732  * if inc: # <<<<<<<<<<<<<<
19733  * Py_INCREF((<PyObject **> data)[0])
19734  * else:
19735  */
19736  __Pyx_TraceLine(1385,0,__PYX_ERR(1, 1385, __pyx_L1_error))
19737  __pyx_t_4 = (__pyx_v_inc != 0);
19738  if (__pyx_t_4) {
19739 
19740  /* "View.MemoryView":1386
19741  * if ndim == 1:
19742  * if inc:
19743  * Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
19744  * else:
19745  * Py_DECREF((<PyObject **> data)[0])
19746  */
19747  __Pyx_TraceLine(1386,0,__PYX_ERR(1, 1386, __pyx_L1_error))
19748  Py_INCREF((((PyObject **)__pyx_v_data)[0]));
19749 
19750  /* "View.MemoryView":1385
19751  * for i in range(shape[0]):
19752  * if ndim == 1:
19753  * if inc: # <<<<<<<<<<<<<<
19754  * Py_INCREF((<PyObject **> data)[0])
19755  * else:
19756  */
19757  goto __pyx_L6;
19758  }
19759 
19760  /* "View.MemoryView":1388
19761  * Py_INCREF((<PyObject **> data)[0])
19762  * else:
19763  * Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
19764  * else:
19765  * refcount_objects_in_slice(data, shape + 1, strides + 1,
19766  */
19767  __Pyx_TraceLine(1388,0,__PYX_ERR(1, 1388, __pyx_L1_error))
19768  /*else*/ {
19769  Py_DECREF((((PyObject **)__pyx_v_data)[0]));
19770  }
19771  __pyx_L6:;
19772 
19773  /* "View.MemoryView":1384
19774  *
19775  * for i in range(shape[0]):
19776  * if ndim == 1: # <<<<<<<<<<<<<<
19777  * if inc:
19778  * Py_INCREF((<PyObject **> data)[0])
19779  */
19780  goto __pyx_L5;
19781  }
19782 
19783  /* "View.MemoryView":1390
19784  * Py_DECREF((<PyObject **> data)[0])
19785  * else:
19786  * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
19787  * ndim - 1, inc)
19788  *
19789  */
19790  __Pyx_TraceLine(1390,0,__PYX_ERR(1, 1390, __pyx_L1_error))
19791  /*else*/ {
19792 
19793  /* "View.MemoryView":1391
19794  * else:
19795  * refcount_objects_in_slice(data, shape + 1, strides + 1,
19796  * ndim - 1, inc) # <<<<<<<<<<<<<<
19797  *
19798  * data += strides[0]
19799  */
19800  __Pyx_TraceLine(1391,0,__PYX_ERR(1, 1391, __pyx_L1_error))
19801  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
19802  }
19803  __pyx_L5:;
19804 
19805  /* "View.MemoryView":1393
19806  * ndim - 1, inc)
19807  *
19808  * data += strides[0] # <<<<<<<<<<<<<<
19809  *
19810  *
19811  */
19812  __Pyx_TraceLine(1393,0,__PYX_ERR(1, 1393, __pyx_L1_error))
19813  __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
19814  }
19815 
19816  /* "View.MemoryView":1379
19817  *
19818  * @cname('__pyx_memoryview_refcount_objects_in_slice')
19819  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19820  * Py_ssize_t *strides, int ndim, bint inc):
19821  * cdef Py_ssize_t i
19822  */
19823 
19824  /* function exit code */
19825  goto __pyx_L0;
19826  __pyx_L1_error:;
19827  __Pyx_WriteUnraisable("View.MemoryView.refcount_objects_in_slice", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
19828  __pyx_L0:;
19829  __Pyx_TraceReturn(Py_None, 0);
19830  __Pyx_RefNannyFinishContext();
19831 }
19832 
19833 /* "View.MemoryView":1399
19834  *
19835  * @cname('__pyx_memoryview_slice_assign_scalar')
19836  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
19837  * size_t itemsize, void *item,
19838  * bint dtype_is_object) nogil:
19839  */
19840 
19841 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
19842  __Pyx_TraceDeclarations
19843  int __pyx_lineno = 0;
19844  const char *__pyx_filename = NULL;
19845  int __pyx_clineno = 0;
19846  __Pyx_TraceCall("slice_assign_scalar", __pyx_f[1], 1399, 1, __PYX_ERR(1, 1399, __pyx_L1_error));
19847 
19848  /* "View.MemoryView":1402
19849  * size_t itemsize, void *item,
19850  * bint dtype_is_object) nogil:
19851  * refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
19852  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
19853  * itemsize, item)
19854  */
19855  __Pyx_TraceLine(1402,1,__PYX_ERR(1, 1402, __pyx_L1_error))
19856  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
19857 
19858  /* "View.MemoryView":1403
19859  * bint dtype_is_object) nogil:
19860  * refcount_copying(dst, dtype_is_object, ndim, False)
19861  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<<
19862  * itemsize, item)
19863  * refcount_copying(dst, dtype_is_object, ndim, True)
19864  */
19865  __Pyx_TraceLine(1403,1,__PYX_ERR(1, 1403, __pyx_L1_error))
19866  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
19867 
19868  /* "View.MemoryView":1405
19869  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
19870  * itemsize, item)
19871  * refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
19872  *
19873  *
19874  */
19875  __Pyx_TraceLine(1405,1,__PYX_ERR(1, 1405, __pyx_L1_error))
19876  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
19877 
19878  /* "View.MemoryView":1399
19879  *
19880  * @cname('__pyx_memoryview_slice_assign_scalar')
19881  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
19882  * size_t itemsize, void *item,
19883  * bint dtype_is_object) nogil:
19884  */
19885 
19886  /* function exit code */
19887  goto __pyx_L0;
19888  __pyx_L1_error:;
19889  __Pyx_WriteUnraisable("View.MemoryView.slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
19890  __pyx_L0:;
19891  __Pyx_TraceReturn(Py_None, 1);
19892 }
19893 
19894 /* "View.MemoryView":1409
19895  *
19896  * @cname('__pyx_memoryview__slice_assign_scalar')
19897  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
19898  * Py_ssize_t *strides, int ndim,
19899  * size_t itemsize, void *item) nogil:
19900  */
19901 
19902 static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
19903  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
19904  Py_ssize_t __pyx_v_stride;
19905  Py_ssize_t __pyx_v_extent;
19906  __Pyx_TraceDeclarations
19907  int __pyx_t_1;
19908  Py_ssize_t __pyx_t_2;
19909  Py_ssize_t __pyx_t_3;
19910  Py_ssize_t __pyx_t_4;
19911  int __pyx_lineno = 0;
19912  const char *__pyx_filename = NULL;
19913  int __pyx_clineno = 0;
19914  __Pyx_TraceCall("_slice_assign_scalar", __pyx_f[1], 1409, 1, __PYX_ERR(1, 1409, __pyx_L1_error));
19915 
19916  /* "View.MemoryView":1413
19917  * size_t itemsize, void *item) nogil:
19918  * cdef Py_ssize_t i
19919  * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
19920  * cdef Py_ssize_t extent = shape[0]
19921  *
19922  */
19923  __Pyx_TraceLine(1413,1,__PYX_ERR(1, 1413, __pyx_L1_error))
19924  __pyx_v_stride = (__pyx_v_strides[0]);
19925 
19926  /* "View.MemoryView":1414
19927  * cdef Py_ssize_t i
19928  * cdef Py_ssize_t stride = strides[0]
19929  * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
19930  *
19931  * if ndim == 1:
19932  */
19933  __Pyx_TraceLine(1414,1,__PYX_ERR(1, 1414, __pyx_L1_error))
19934  __pyx_v_extent = (__pyx_v_shape[0]);
19935 
19936  /* "View.MemoryView":1416
19937  * cdef Py_ssize_t extent = shape[0]
19938  *
19939  * if ndim == 1: # <<<<<<<<<<<<<<
19940  * for i in range(extent):
19941  * memcpy(data, item, itemsize)
19942  */
19943  __Pyx_TraceLine(1416,1,__PYX_ERR(1, 1416, __pyx_L1_error))
19944  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
19945  if (__pyx_t_1) {
19946 
19947  /* "View.MemoryView":1417
19948  *
19949  * if ndim == 1:
19950  * for i in range(extent): # <<<<<<<<<<<<<<
19951  * memcpy(data, item, itemsize)
19952  * data += stride
19953  */
19954  __Pyx_TraceLine(1417,1,__PYX_ERR(1, 1417, __pyx_L1_error))
19955  __pyx_t_2 = __pyx_v_extent;
19956  __pyx_t_3 = __pyx_t_2;
19957  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
19958  __pyx_v_i = __pyx_t_4;
19959 
19960  /* "View.MemoryView":1418
19961  * if ndim == 1:
19962  * for i in range(extent):
19963  * memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
19964  * data += stride
19965  * else:
19966  */
19967  __Pyx_TraceLine(1418,1,__PYX_ERR(1, 1418, __pyx_L1_error))
19968  (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
19969 
19970  /* "View.MemoryView":1419
19971  * for i in range(extent):
19972  * memcpy(data, item, itemsize)
19973  * data += stride # <<<<<<<<<<<<<<
19974  * else:
19975  * for i in range(extent):
19976  */
19977  __Pyx_TraceLine(1419,1,__PYX_ERR(1, 1419, __pyx_L1_error))
19978  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
19979  }
19980 
19981  /* "View.MemoryView":1416
19982  * cdef Py_ssize_t extent = shape[0]
19983  *
19984  * if ndim == 1: # <<<<<<<<<<<<<<
19985  * for i in range(extent):
19986  * memcpy(data, item, itemsize)
19987  */
19988  goto __pyx_L3;
19989  }
19990 
19991  /* "View.MemoryView":1421
19992  * data += stride
19993  * else:
19994  * for i in range(extent): # <<<<<<<<<<<<<<
19995  * _slice_assign_scalar(data, shape + 1, strides + 1,
19996  * ndim - 1, itemsize, item)
19997  */
19998  __Pyx_TraceLine(1421,1,__PYX_ERR(1, 1421, __pyx_L1_error))
19999  /*else*/ {
20000  __pyx_t_2 = __pyx_v_extent;
20001  __pyx_t_3 = __pyx_t_2;
20002  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
20003  __pyx_v_i = __pyx_t_4;
20004 
20005  /* "View.MemoryView":1422
20006  * else:
20007  * for i in range(extent):
20008  * _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
20009  * ndim - 1, itemsize, item)
20010  * data += stride
20011  */
20012  __Pyx_TraceLine(1422,1,__PYX_ERR(1, 1422, __pyx_L1_error))
20013  __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
20014 
20015  /* "View.MemoryView":1424
20016  * _slice_assign_scalar(data, shape + 1, strides + 1,
20017  * ndim - 1, itemsize, item)
20018  * data += stride # <<<<<<<<<<<<<<
20019  *
20020  *
20021  */
20022  __Pyx_TraceLine(1424,1,__PYX_ERR(1, 1424, __pyx_L1_error))
20023  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
20024  }
20025  }
20026  __pyx_L3:;
20027 
20028  /* "View.MemoryView":1409
20029  *
20030  * @cname('__pyx_memoryview__slice_assign_scalar')
20031  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
20032  * Py_ssize_t *strides, int ndim,
20033  * size_t itemsize, void *item) nogil:
20034  */
20035 
20036  /* function exit code */
20037  goto __pyx_L0;
20038  __pyx_L1_error:;
20039  __Pyx_WriteUnraisable("View.MemoryView._slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
20040  __pyx_L0:;
20041  __Pyx_TraceReturn(Py_None, 1);
20042 }
20043 
20044 /* "(tree fragment)":1
20045  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
20046  * cdef object __pyx_PickleError
20047  * cdef object __pyx_result
20048  */
20049 
20050 /* Python wrapper */
20051 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20052 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
20053 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20054  PyObject *__pyx_v___pyx_type = 0;
20055  long __pyx_v___pyx_checksum;
20056  PyObject *__pyx_v___pyx_state = 0;
20057  int __pyx_lineno = 0;
20058  const char *__pyx_filename = NULL;
20059  int __pyx_clineno = 0;
20060  PyObject *__pyx_r = 0;
20061  __Pyx_RefNannyDeclarations
20062  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
20063  {
20064  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
20065  PyObject* values[3] = {0,0,0};
20066  if (unlikely(__pyx_kwds)) {
20067  Py_ssize_t kw_args;
20068  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20069  switch (pos_args) {
20070  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20071  CYTHON_FALLTHROUGH;
20072  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20073  CYTHON_FALLTHROUGH;
20074  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20075  CYTHON_FALLTHROUGH;
20076  case 0: break;
20077  default: goto __pyx_L5_argtuple_error;
20078  }
20079  kw_args = PyDict_Size(__pyx_kwds);
20080  switch (pos_args) {
20081  case 0:
20082  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
20083  else goto __pyx_L5_argtuple_error;
20084  CYTHON_FALLTHROUGH;
20085  case 1:
20086  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
20087  else {
20088  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
20089  }
20090  CYTHON_FALLTHROUGH;
20091  case 2:
20092  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
20093  else {
20094  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
20095  }
20096  }
20097  if (unlikely(kw_args > 0)) {
20098  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
20099  }
20100  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
20101  goto __pyx_L5_argtuple_error;
20102  } else {
20103  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20104  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20105  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20106  }
20107  __pyx_v___pyx_type = values[0];
20108  __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
20109  __pyx_v___pyx_state = values[2];
20110  }
20111  goto __pyx_L4_argument_unpacking_done;
20112  __pyx_L5_argtuple_error:;
20113  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
20114  __pyx_L3_error:;
20115  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
20116  __Pyx_RefNannyFinishContext();
20117  return NULL;
20118  __pyx_L4_argument_unpacking_done:;
20119  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
20120 
20121  /* function exit code */
20122  __Pyx_RefNannyFinishContext();
20123  return __pyx_r;
20124 }
20125 
20126 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
20127  PyObject *__pyx_v___pyx_PickleError = 0;
20128  PyObject *__pyx_v___pyx_result = 0;
20129  PyObject *__pyx_r = NULL;
20130  __Pyx_TraceDeclarations
20131  __Pyx_RefNannyDeclarations
20132  PyObject *__pyx_t_1 = NULL;
20133  int __pyx_t_2;
20134  int __pyx_t_3;
20135  PyObject *__pyx_t_4 = NULL;
20136  PyObject *__pyx_t_5 = NULL;
20137  PyObject *__pyx_t_6 = NULL;
20138  int __pyx_lineno = 0;
20139  const char *__pyx_filename = NULL;
20140  int __pyx_clineno = 0;
20141  __Pyx_TraceFrameInit(__pyx_codeobj__36)
20142  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
20143  __Pyx_TraceCall("__pyx_unpickle_Enum", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
20144 
20145  /* "(tree fragment)":4
20146  * cdef object __pyx_PickleError
20147  * cdef object __pyx_result
20148  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995): # <<<<<<<<<<<<<<
20149  * from pickle import PickleError as __pyx_PickleError
20150  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20151  */
20152  __Pyx_TraceLine(4,0,__PYX_ERR(1, 4, __pyx_L1_error))
20153  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
20154  __Pyx_GOTREF(__pyx_t_1);
20155  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__37, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
20156  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20157  __pyx_t_3 = (__pyx_t_2 != 0);
20158  if (__pyx_t_3) {
20159 
20160  /* "(tree fragment)":5
20161  * cdef object __pyx_result
20162  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
20163  * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
20164  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20165  * __pyx_result = Enum.__new__(__pyx_type)
20166  */
20167  __Pyx_TraceLine(5,0,__PYX_ERR(1, 5, __pyx_L1_error))
20168  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
20169  __Pyx_GOTREF(__pyx_t_1);
20170  __Pyx_INCREF(__pyx_n_s_PickleError);
20171  __Pyx_GIVEREF(__pyx_n_s_PickleError);
20172  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
20173  __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
20174  __Pyx_GOTREF(__pyx_t_4);
20175  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20176  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
20177  __Pyx_GOTREF(__pyx_t_1);
20178  __Pyx_INCREF(__pyx_t_1);
20179  __pyx_v___pyx_PickleError = __pyx_t_1;
20180  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20181  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20182 
20183  /* "(tree fragment)":6
20184  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
20185  * from pickle import PickleError as __pyx_PickleError
20186  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum) # <<<<<<<<<<<<<<
20187  * __pyx_result = Enum.__new__(__pyx_type)
20188  * if __pyx_state is not None:
20189  */
20190  __Pyx_TraceLine(6,0,__PYX_ERR(1, 6, __pyx_L1_error))
20191  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
20192  __Pyx_GOTREF(__pyx_t_1);
20193  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
20194  __Pyx_GOTREF(__pyx_t_5);
20195  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20196  __Pyx_INCREF(__pyx_v___pyx_PickleError);
20197  __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
20198  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
20199  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
20200  if (likely(__pyx_t_6)) {
20201  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
20202  __Pyx_INCREF(__pyx_t_6);
20203  __Pyx_INCREF(function);
20204  __Pyx_DECREF_SET(__pyx_t_1, function);
20205  }
20206  }
20207  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
20208  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20209  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20210  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
20211  __Pyx_GOTREF(__pyx_t_4);
20212  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20213  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
20214  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20215  __PYX_ERR(1, 6, __pyx_L1_error)
20216 
20217  /* "(tree fragment)":4
20218  * cdef object __pyx_PickleError
20219  * cdef object __pyx_result
20220  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995): # <<<<<<<<<<<<<<
20221  * from pickle import PickleError as __pyx_PickleError
20222  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20223  */
20224  }
20225 
20226  /* "(tree fragment)":7
20227  * from pickle import PickleError as __pyx_PickleError
20228  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20229  * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<<
20230  * if __pyx_state is not None:
20231  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20232  */
20233  __Pyx_TraceLine(7,0,__PYX_ERR(1, 7, __pyx_L1_error))
20234  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
20235  __Pyx_GOTREF(__pyx_t_1);
20236  __pyx_t_5 = NULL;
20237  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
20238  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
20239  if (likely(__pyx_t_5)) {
20240  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
20241  __Pyx_INCREF(__pyx_t_5);
20242  __Pyx_INCREF(function);
20243  __Pyx_DECREF_SET(__pyx_t_1, function);
20244  }
20245  }
20246  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
20247  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20248  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
20249  __Pyx_GOTREF(__pyx_t_4);
20250  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20251  __pyx_v___pyx_result = __pyx_t_4;
20252  __pyx_t_4 = 0;
20253 
20254  /* "(tree fragment)":8
20255  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20256  * __pyx_result = Enum.__new__(__pyx_type)
20257  * if __pyx_state is not None: # <<<<<<<<<<<<<<
20258  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20259  * return __pyx_result
20260  */
20261  __Pyx_TraceLine(8,0,__PYX_ERR(1, 8, __pyx_L1_error))
20262  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
20263  __pyx_t_2 = (__pyx_t_3 != 0);
20264  if (__pyx_t_2) {
20265 
20266  /* "(tree fragment)":9
20267  * __pyx_result = Enum.__new__(__pyx_type)
20268  * if __pyx_state is not None:
20269  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
20270  * return __pyx_result
20271  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
20272  */
20273  __Pyx_TraceLine(9,0,__PYX_ERR(1, 9, __pyx_L1_error))
20274  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
20275  __pyx_t_4 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
20276  __Pyx_GOTREF(__pyx_t_4);
20277  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20278 
20279  /* "(tree fragment)":8
20280  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
20281  * __pyx_result = Enum.__new__(__pyx_type)
20282  * if __pyx_state is not None: # <<<<<<<<<<<<<<
20283  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20284  * return __pyx_result
20285  */
20286  }
20287 
20288  /* "(tree fragment)":10
20289  * if __pyx_state is not None:
20290  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20291  * return __pyx_result # <<<<<<<<<<<<<<
20292  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
20293  * __pyx_result.name = __pyx_state[0]
20294  */
20295  __Pyx_TraceLine(10,0,__PYX_ERR(1, 10, __pyx_L1_error))
20296  __Pyx_XDECREF(__pyx_r);
20297  __Pyx_INCREF(__pyx_v___pyx_result);
20298  __pyx_r = __pyx_v___pyx_result;
20299  goto __pyx_L0;
20300 
20301  /* "(tree fragment)":1
20302  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
20303  * cdef object __pyx_PickleError
20304  * cdef object __pyx_result
20305  */
20306 
20307  /* function exit code */
20308  __pyx_L1_error:;
20309  __Pyx_XDECREF(__pyx_t_1);
20310  __Pyx_XDECREF(__pyx_t_4);
20311  __Pyx_XDECREF(__pyx_t_5);
20312  __Pyx_XDECREF(__pyx_t_6);
20313  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
20314  __pyx_r = NULL;
20315  __pyx_L0:;
20316  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
20317  __Pyx_XDECREF(__pyx_v___pyx_result);
20318  __Pyx_XGIVEREF(__pyx_r);
20319  __Pyx_TraceReturn(__pyx_r, 0);
20320  __Pyx_RefNannyFinishContext();
20321  return __pyx_r;
20322 }
20323 
20324 /* "(tree fragment)":11
20325  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20326  * return __pyx_result
20327  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
20328  * __pyx_result.name = __pyx_state[0]
20329  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
20330  */
20331 
20332 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
20333  PyObject *__pyx_r = NULL;
20334  __Pyx_TraceDeclarations
20335  __Pyx_RefNannyDeclarations
20336  PyObject *__pyx_t_1 = NULL;
20337  int __pyx_t_2;
20338  Py_ssize_t __pyx_t_3;
20339  int __pyx_t_4;
20340  int __pyx_t_5;
20341  PyObject *__pyx_t_6 = NULL;
20342  PyObject *__pyx_t_7 = NULL;
20343  PyObject *__pyx_t_8 = NULL;
20344  int __pyx_lineno = 0;
20345  const char *__pyx_filename = NULL;
20346  int __pyx_clineno = 0;
20347  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
20348  __Pyx_TraceCall("__pyx_unpickle_Enum__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
20349 
20350  /* "(tree fragment)":12
20351  * return __pyx_result
20352  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
20353  * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<<
20354  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
20355  * __pyx_result.__dict__.update(__pyx_state[1])
20356  */
20357  __Pyx_TraceLine(12,0,__PYX_ERR(1, 12, __pyx_L1_error))
20358  if (unlikely(__pyx_v___pyx_state == Py_None)) {
20359  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
20360  __PYX_ERR(1, 12, __pyx_L1_error)
20361  }
20362  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
20363  __Pyx_GOTREF(__pyx_t_1);
20364  __Pyx_GIVEREF(__pyx_t_1);
20365  __Pyx_GOTREF(__pyx_v___pyx_result->name);
20366  __Pyx_DECREF(__pyx_v___pyx_result->name);
20367  __pyx_v___pyx_result->name = __pyx_t_1;
20368  __pyx_t_1 = 0;
20369 
20370  /* "(tree fragment)":13
20371  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
20372  * __pyx_result.name = __pyx_state[0]
20373  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
20374  * __pyx_result.__dict__.update(__pyx_state[1])
20375  */
20376  __Pyx_TraceLine(13,0,__PYX_ERR(1, 13, __pyx_L1_error))
20377  if (unlikely(__pyx_v___pyx_state == Py_None)) {
20378  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
20379  __PYX_ERR(1, 13, __pyx_L1_error)
20380  }
20381  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
20382  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
20383  if (__pyx_t_4) {
20384  } else {
20385  __pyx_t_2 = __pyx_t_4;
20386  goto __pyx_L4_bool_binop_done;
20387  }
20388  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
20389  __pyx_t_5 = (__pyx_t_4 != 0);
20390  __pyx_t_2 = __pyx_t_5;
20391  __pyx_L4_bool_binop_done:;
20392  if (__pyx_t_2) {
20393 
20394  /* "(tree fragment)":14
20395  * __pyx_result.name = __pyx_state[0]
20396  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
20397  * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
20398  */
20399  __Pyx_TraceLine(14,0,__PYX_ERR(1, 14, __pyx_L1_error))
20400  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
20401  __Pyx_GOTREF(__pyx_t_6);
20402  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
20403  __Pyx_GOTREF(__pyx_t_7);
20404  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20405  if (unlikely(__pyx_v___pyx_state == Py_None)) {
20406  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
20407  __PYX_ERR(1, 14, __pyx_L1_error)
20408  }
20409  __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
20410  __Pyx_GOTREF(__pyx_t_6);
20411  __pyx_t_8 = NULL;
20412  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
20413  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
20414  if (likely(__pyx_t_8)) {
20415  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
20416  __Pyx_INCREF(__pyx_t_8);
20417  __Pyx_INCREF(function);
20418  __Pyx_DECREF_SET(__pyx_t_7, function);
20419  }
20420  }
20421  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
20422  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
20423  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20424  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
20425  __Pyx_GOTREF(__pyx_t_1);
20426  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20427  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20428 
20429  /* "(tree fragment)":13
20430  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
20431  * __pyx_result.name = __pyx_state[0]
20432  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
20433  * __pyx_result.__dict__.update(__pyx_state[1])
20434  */
20435  }
20436 
20437  /* "(tree fragment)":11
20438  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
20439  * return __pyx_result
20440  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
20441  * __pyx_result.name = __pyx_state[0]
20442  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
20443  */
20444 
20445  /* function exit code */
20446  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20447  goto __pyx_L0;
20448  __pyx_L1_error:;
20449  __Pyx_XDECREF(__pyx_t_1);
20450  __Pyx_XDECREF(__pyx_t_6);
20451  __Pyx_XDECREF(__pyx_t_7);
20452  __Pyx_XDECREF(__pyx_t_8);
20453  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
20454  __pyx_r = 0;
20455  __pyx_L0:;
20456  __Pyx_XGIVEREF(__pyx_r);
20457  __Pyx_TraceReturn(__pyx_r, 0);
20458  __Pyx_RefNannyFinishContext();
20459  return __pyx_r;
20460 }
20461 static struct __pyx_vtabstruct_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
20462 
20463 static PyObject *__pyx_tp_new_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
20464  struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *p;
20465  PyObject *o;
20466  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
20467  o = (*t->tp_alloc)(t, 0);
20468  } else {
20469  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
20470  }
20471  if (unlikely(!o)) return 0;
20472  p = ((struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)o);
20473  p->__pyx_vtab = __pyx_vtabptr_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
20474  p->parameters = Py_None; Py_INCREF(Py_None);
20475  if (unlikely(__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
20476  return o;
20477  bad:
20478  Py_DECREF(o); o = 0;
20479  return NULL;
20480 }
20481 
20482 static void __pyx_tp_dealloc_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator(PyObject *o) {
20483  struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *p = (struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)o;
20484  #if CYTHON_USE_TP_FINALIZE
20485  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
20486  if (PyObject_CallFinalizerFromDealloc(o)) return;
20487  }
20488  #endif
20489  PyObject_GC_UnTrack(o);
20490  {
20491  PyObject *etype, *eval, *etb;
20492  PyErr_Fetch(&etype, &eval, &etb);
20493  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
20494  __pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_3__dealloc__(o);
20495  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
20496  PyErr_Restore(etype, eval, etb);
20497  }
20498  Py_CLEAR(p->parameters);
20499  (*Py_TYPE(o)->tp_free)(o);
20500 }
20501 
20502 static int __pyx_tp_traverse_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator(PyObject *o, visitproc v, void *a) {
20503  int e;
20504  struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *p = (struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)o;
20505  if (p->parameters) {
20506  e = (*v)(p->parameters, a); if (e) return e;
20507  }
20508  return 0;
20509 }
20510 
20511 static int __pyx_tp_clear_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator(PyObject *o) {
20512  PyObject* tmp;
20513  struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *p = (struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *)o;
20514  tmp = ((PyObject*)p->parameters);
20515  p->parameters = Py_None; Py_INCREF(Py_None);
20516  Py_XDECREF(tmp);
20517  return 0;
20518 }
20519 
20520 static PyMethodDef __pyx_methods_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator[] = {
20521  {"get_num_parameters", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_4get_num_parameters},
20522  {"get_data_type_name", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_6get_data_type_name},
20523  {"set_parameters", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters, METH_O, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_8set_parameters},
20524  {"__reduce_cython__", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__, METH_NOARGS, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_14__reduce_cython__},
20525  {"__setstate_cython__", (PyCFunction)__pyx_pw_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__, METH_O, __pyx_doc_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_16__setstate_cython__},
20526  {0, 0, 0, 0}
20527 };
20528 
20529 static PyTypeObject __pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator = {
20530  PyVarObject_HEAD_INIT(0, 0)
20531  "imate._c_linear_operator.py_c_linear_operator.pycLinearOperator", /*tp_name*/
20532  sizeof(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator), /*tp_basicsize*/
20533  0, /*tp_itemsize*/
20534  __pyx_tp_dealloc_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator, /*tp_dealloc*/
20535  #if PY_VERSION_HEX < 0x030800b4
20536  0, /*tp_print*/
20537  #endif
20538  #if PY_VERSION_HEX >= 0x030800b4
20539  0, /*tp_vectorcall_offset*/
20540  #endif
20541  0, /*tp_getattr*/
20542  0, /*tp_setattr*/
20543  #if PY_MAJOR_VERSION < 3
20544  0, /*tp_compare*/
20545  #endif
20546  #if PY_MAJOR_VERSION >= 3
20547  0, /*tp_as_async*/
20548  #endif
20549  0, /*tp_repr*/
20550  0, /*tp_as_number*/
20551  0, /*tp_as_sequence*/
20552  0, /*tp_as_mapping*/
20553  0, /*tp_hash*/
20554  0, /*tp_call*/
20555  0, /*tp_str*/
20556  0, /*tp_getattro*/
20557  0, /*tp_setattro*/
20558  0, /*tp_as_buffer*/
20559  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
20560  "\n ", /*tp_doc*/
20561  __pyx_tp_traverse_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator, /*tp_traverse*/
20562  __pyx_tp_clear_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator, /*tp_clear*/
20563  0, /*tp_richcompare*/
20564  0, /*tp_weaklistoffset*/
20565  0, /*tp_iter*/
20566  0, /*tp_iternext*/
20567  __pyx_methods_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator, /*tp_methods*/
20568  0, /*tp_members*/
20569  0, /*tp_getset*/
20570  0, /*tp_base*/
20571  0, /*tp_dict*/
20572  0, /*tp_descr_get*/
20573  0, /*tp_descr_set*/
20574  0, /*tp_dictoffset*/
20575  0, /*tp_init*/
20576  0, /*tp_alloc*/
20577  __pyx_tp_new_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator, /*tp_new*/
20578  0, /*tp_free*/
20579  0, /*tp_is_gc*/
20580  0, /*tp_bases*/
20581  0, /*tp_mro*/
20582  0, /*tp_cache*/
20583  0, /*tp_subclasses*/
20584  0, /*tp_weaklist*/
20585  0, /*tp_del*/
20586  0, /*tp_version_tag*/
20587  #if PY_VERSION_HEX >= 0x030400a1
20588  0, /*tp_finalize*/
20589  #endif
20590  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
20591  0, /*tp_vectorcall*/
20592  #endif
20593  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
20594  0, /*tp_print*/
20595  #endif
20596  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
20597  0, /*tp_pypy_flags*/
20598  #endif
20599 };
20600 static struct __pyx_vtabstruct_array __pyx_vtable_array;
20601 
20602 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
20603  struct __pyx_array_obj *p;
20604  PyObject *o;
20605  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
20606  o = (*t->tp_alloc)(t, 0);
20607  } else {
20608  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
20609  }
20610  if (unlikely(!o)) return 0;
20611  p = ((struct __pyx_array_obj *)o);
20612  p->__pyx_vtab = __pyx_vtabptr_array;
20613  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
20614  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
20615  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
20616  return o;
20617  bad:
20618  Py_DECREF(o); o = 0;
20619  return NULL;
20620 }
20621 
20622 static void __pyx_tp_dealloc_array(PyObject *o) {
20623  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
20624  #if CYTHON_USE_TP_FINALIZE
20625  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
20626  if (PyObject_CallFinalizerFromDealloc(o)) return;
20627  }
20628  #endif
20629  {
20630  PyObject *etype, *eval, *etb;
20631  PyErr_Fetch(&etype, &eval, &etb);
20632  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
20633  __pyx_array___dealloc__(o);
20634  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
20635  PyErr_Restore(etype, eval, etb);
20636  }
20637  Py_CLEAR(p->mode);
20638  Py_CLEAR(p->_format);
20639  (*Py_TYPE(o)->tp_free)(o);
20640 }
20641 static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
20642  PyObject *r;
20643  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
20644  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
20645  Py_DECREF(x);
20646  return r;
20647 }
20648 
20649 static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
20650  if (v) {
20651  return __pyx_array___setitem__(o, i, v);
20652  }
20653  else {
20654  PyErr_Format(PyExc_NotImplementedError,
20655  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
20656  return -1;
20657  }
20658 }
20659 
20660 static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
20661  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
20662  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
20663  PyErr_Clear();
20664  v = __pyx_array___getattr__(o, n);
20665  }
20666  return v;
20667 }
20668 
20669 static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
20670  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
20671 }
20672 
20673 static PyMethodDef __pyx_methods_array[] = {
20674  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
20675  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
20676  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
20677  {0, 0, 0, 0}
20678 };
20679 
20680 static struct PyGetSetDef __pyx_getsets_array[] = {
20681  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
20682  {0, 0, 0, 0, 0}
20683 };
20684 
20685 static PySequenceMethods __pyx_tp_as_sequence_array = {
20686  __pyx_array___len__, /*sq_length*/
20687  0, /*sq_concat*/
20688  0, /*sq_repeat*/
20689  __pyx_sq_item_array, /*sq_item*/
20690  0, /*sq_slice*/
20691  0, /*sq_ass_item*/
20692  0, /*sq_ass_slice*/
20693  0, /*sq_contains*/
20694  0, /*sq_inplace_concat*/
20695  0, /*sq_inplace_repeat*/
20696 };
20697 
20698 static PyMappingMethods __pyx_tp_as_mapping_array = {
20699  __pyx_array___len__, /*mp_length*/
20700  __pyx_array___getitem__, /*mp_subscript*/
20701  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
20702 };
20703 
20704 static PyBufferProcs __pyx_tp_as_buffer_array = {
20705  #if PY_MAJOR_VERSION < 3
20706  0, /*bf_getreadbuffer*/
20707  #endif
20708  #if PY_MAJOR_VERSION < 3
20709  0, /*bf_getwritebuffer*/
20710  #endif
20711  #if PY_MAJOR_VERSION < 3
20712  0, /*bf_getsegcount*/
20713  #endif
20714  #if PY_MAJOR_VERSION < 3
20715  0, /*bf_getcharbuffer*/
20716  #endif
20717  __pyx_array_getbuffer, /*bf_getbuffer*/
20718  0, /*bf_releasebuffer*/
20719 };
20720 
20721 static PyTypeObject __pyx_type___pyx_array = {
20722  PyVarObject_HEAD_INIT(0, 0)
20723  "imate._c_linear_operator.py_c_linear_operator.array", /*tp_name*/
20724  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
20725  0, /*tp_itemsize*/
20726  __pyx_tp_dealloc_array, /*tp_dealloc*/
20727  #if PY_VERSION_HEX < 0x030800b4
20728  0, /*tp_print*/
20729  #endif
20730  #if PY_VERSION_HEX >= 0x030800b4
20731  0, /*tp_vectorcall_offset*/
20732  #endif
20733  0, /*tp_getattr*/
20734  0, /*tp_setattr*/
20735  #if PY_MAJOR_VERSION < 3
20736  0, /*tp_compare*/
20737  #endif
20738  #if PY_MAJOR_VERSION >= 3
20739  0, /*tp_as_async*/
20740  #endif
20741  0, /*tp_repr*/
20742  0, /*tp_as_number*/
20743  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
20744  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
20745  0, /*tp_hash*/
20746  0, /*tp_call*/
20747  0, /*tp_str*/
20748  __pyx_tp_getattro_array, /*tp_getattro*/
20749  0, /*tp_setattro*/
20750  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
20751  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
20752  0, /*tp_doc*/
20753  0, /*tp_traverse*/
20754  0, /*tp_clear*/
20755  0, /*tp_richcompare*/
20756  0, /*tp_weaklistoffset*/
20757  0, /*tp_iter*/
20758  0, /*tp_iternext*/
20759  __pyx_methods_array, /*tp_methods*/
20760  0, /*tp_members*/
20761  __pyx_getsets_array, /*tp_getset*/
20762  0, /*tp_base*/
20763  0, /*tp_dict*/
20764  0, /*tp_descr_get*/
20765  0, /*tp_descr_set*/
20766  0, /*tp_dictoffset*/
20767  0, /*tp_init*/
20768  0, /*tp_alloc*/
20769  __pyx_tp_new_array, /*tp_new*/
20770  0, /*tp_free*/
20771  0, /*tp_is_gc*/
20772  0, /*tp_bases*/
20773  0, /*tp_mro*/
20774  0, /*tp_cache*/
20775  0, /*tp_subclasses*/
20776  0, /*tp_weaklist*/
20777  0, /*tp_del*/
20778  0, /*tp_version_tag*/
20779  #if PY_VERSION_HEX >= 0x030400a1
20780  0, /*tp_finalize*/
20781  #endif
20782  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
20783  0, /*tp_vectorcall*/
20784  #endif
20785  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
20786  0, /*tp_print*/
20787  #endif
20788  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
20789  0, /*tp_pypy_flags*/
20790  #endif
20791 };
20792 
20793 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
20794  struct __pyx_MemviewEnum_obj *p;
20795  PyObject *o;
20796  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
20797  o = (*t->tp_alloc)(t, 0);
20798  } else {
20799  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
20800  }
20801  if (unlikely(!o)) return 0;
20802  p = ((struct __pyx_MemviewEnum_obj *)o);
20803  p->name = Py_None; Py_INCREF(Py_None);
20804  return o;
20805 }
20806 
20807 static void __pyx_tp_dealloc_Enum(PyObject *o) {
20808  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
20809  #if CYTHON_USE_TP_FINALIZE
20810  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
20811  if (PyObject_CallFinalizerFromDealloc(o)) return;
20812  }
20813  #endif
20814  PyObject_GC_UnTrack(o);
20815  Py_CLEAR(p->name);
20816  (*Py_TYPE(o)->tp_free)(o);
20817 }
20818 
20819 static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
20820  int e;
20821  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
20822  if (p->name) {
20823  e = (*v)(p->name, a); if (e) return e;
20824  }
20825  return 0;
20826 }
20827 
20828 static int __pyx_tp_clear_Enum(PyObject *o) {
20829  PyObject* tmp;
20830  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
20831  tmp = ((PyObject*)p->name);
20832  p->name = Py_None; Py_INCREF(Py_None);
20833  Py_XDECREF(tmp);
20834  return 0;
20835 }
20836 
20837 static PyMethodDef __pyx_methods_Enum[] = {
20838  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
20839  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
20840  {0, 0, 0, 0}
20841 };
20842 
20843 static PyTypeObject __pyx_type___pyx_MemviewEnum = {
20844  PyVarObject_HEAD_INIT(0, 0)
20845  "imate._c_linear_operator.py_c_linear_operator.Enum", /*tp_name*/
20846  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
20847  0, /*tp_itemsize*/
20848  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
20849  #if PY_VERSION_HEX < 0x030800b4
20850  0, /*tp_print*/
20851  #endif
20852  #if PY_VERSION_HEX >= 0x030800b4
20853  0, /*tp_vectorcall_offset*/
20854  #endif
20855  0, /*tp_getattr*/
20856  0, /*tp_setattr*/
20857  #if PY_MAJOR_VERSION < 3
20858  0, /*tp_compare*/
20859  #endif
20860  #if PY_MAJOR_VERSION >= 3
20861  0, /*tp_as_async*/
20862  #endif
20863  __pyx_MemviewEnum___repr__, /*tp_repr*/
20864  0, /*tp_as_number*/
20865  0, /*tp_as_sequence*/
20866  0, /*tp_as_mapping*/
20867  0, /*tp_hash*/
20868  0, /*tp_call*/
20869  0, /*tp_str*/
20870  0, /*tp_getattro*/
20871  0, /*tp_setattro*/
20872  0, /*tp_as_buffer*/
20873  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
20874  0, /*tp_doc*/
20875  __pyx_tp_traverse_Enum, /*tp_traverse*/
20876  __pyx_tp_clear_Enum, /*tp_clear*/
20877  0, /*tp_richcompare*/
20878  0, /*tp_weaklistoffset*/
20879  0, /*tp_iter*/
20880  0, /*tp_iternext*/
20881  __pyx_methods_Enum, /*tp_methods*/
20882  0, /*tp_members*/
20883  0, /*tp_getset*/
20884  0, /*tp_base*/
20885  0, /*tp_dict*/
20886  0, /*tp_descr_get*/
20887  0, /*tp_descr_set*/
20888  0, /*tp_dictoffset*/
20889  __pyx_MemviewEnum___init__, /*tp_init*/
20890  0, /*tp_alloc*/
20891  __pyx_tp_new_Enum, /*tp_new*/
20892  0, /*tp_free*/
20893  0, /*tp_is_gc*/
20894  0, /*tp_bases*/
20895  0, /*tp_mro*/
20896  0, /*tp_cache*/
20897  0, /*tp_subclasses*/
20898  0, /*tp_weaklist*/
20899  0, /*tp_del*/
20900  0, /*tp_version_tag*/
20901  #if PY_VERSION_HEX >= 0x030400a1
20902  0, /*tp_finalize*/
20903  #endif
20904  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
20905  0, /*tp_vectorcall*/
20906  #endif
20907  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
20908  0, /*tp_print*/
20909  #endif
20910  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
20911  0, /*tp_pypy_flags*/
20912  #endif
20913 };
20914 static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
20915 
20916 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
20917  struct __pyx_memoryview_obj *p;
20918  PyObject *o;
20919  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
20920  o = (*t->tp_alloc)(t, 0);
20921  } else {
20922  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
20923  }
20924  if (unlikely(!o)) return 0;
20925  p = ((struct __pyx_memoryview_obj *)o);
20926  p->__pyx_vtab = __pyx_vtabptr_memoryview;
20927  p->obj = Py_None; Py_INCREF(Py_None);
20928  p->_size = Py_None; Py_INCREF(Py_None);
20929  p->_array_interface = Py_None; Py_INCREF(Py_None);
20930  p->view.obj = NULL;
20931  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
20932  return o;
20933  bad:
20934  Py_DECREF(o); o = 0;
20935  return NULL;
20936 }
20937 
20938 static void __pyx_tp_dealloc_memoryview(PyObject *o) {
20939  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
20940  #if CYTHON_USE_TP_FINALIZE
20941  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
20942  if (PyObject_CallFinalizerFromDealloc(o)) return;
20943  }
20944  #endif
20945  PyObject_GC_UnTrack(o);
20946  {
20947  PyObject *etype, *eval, *etb;
20948  PyErr_Fetch(&etype, &eval, &etb);
20949  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
20950  __pyx_memoryview___dealloc__(o);
20951  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
20952  PyErr_Restore(etype, eval, etb);
20953  }
20954  Py_CLEAR(p->obj);
20955  Py_CLEAR(p->_size);
20956  Py_CLEAR(p->_array_interface);
20957  (*Py_TYPE(o)->tp_free)(o);
20958 }
20959 
20960 static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
20961  int e;
20962  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
20963  if (p->obj) {
20964  e = (*v)(p->obj, a); if (e) return e;
20965  }
20966  if (p->_size) {
20967  e = (*v)(p->_size, a); if (e) return e;
20968  }
20969  if (p->_array_interface) {
20970  e = (*v)(p->_array_interface, a); if (e) return e;
20971  }
20972  if (p->view.obj) {
20973  e = (*v)(p->view.obj, a); if (e) return e;
20974  }
20975  return 0;
20976 }
20977 
20978 static int __pyx_tp_clear_memoryview(PyObject *o) {
20979  PyObject* tmp;
20980  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
20981  tmp = ((PyObject*)p->obj);
20982  p->obj = Py_None; Py_INCREF(Py_None);
20983  Py_XDECREF(tmp);
20984  tmp = ((PyObject*)p->_size);
20985  p->_size = Py_None; Py_INCREF(Py_None);
20986  Py_XDECREF(tmp);
20987  tmp = ((PyObject*)p->_array_interface);
20988  p->_array_interface = Py_None; Py_INCREF(Py_None);
20989  Py_XDECREF(tmp);
20990  Py_CLEAR(p->view.obj);
20991  return 0;
20992 }
20993 static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
20994  PyObject *r;
20995  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
20996  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
20997  Py_DECREF(x);
20998  return r;
20999 }
21000 
21001 static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
21002  if (v) {
21003  return __pyx_memoryview___setitem__(o, i, v);
21004  }
21005  else {
21006  PyErr_Format(PyExc_NotImplementedError,
21007  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
21008  return -1;
21009  }
21010 }
21011 
21012 static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
21013  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
21014 }
21015 
21016 static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
21017  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
21018 }
21019 
21020 static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
21021  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
21022 }
21023 
21024 static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
21025  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
21026 }
21027 
21028 static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
21029  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
21030 }
21031 
21032 static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
21033  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
21034 }
21035 
21036 static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
21037  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
21038 }
21039 
21040 static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
21041  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
21042 }
21043 
21044 static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
21045  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
21046 }
21047 
21048 static PyMethodDef __pyx_methods_memoryview[] = {
21049  {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
21050  {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
21051  {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
21052  {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
21053  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
21054  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
21055  {0, 0, 0, 0}
21056 };
21057 
21058 static struct PyGetSetDef __pyx_getsets_memoryview[] = {
21059  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
21060  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
21061  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
21062  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
21063  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
21064  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
21065  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
21066  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
21067  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
21068  {0, 0, 0, 0, 0}
21069 };
21070 
21071 static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
21072  __pyx_memoryview___len__, /*sq_length*/
21073  0, /*sq_concat*/
21074  0, /*sq_repeat*/
21075  __pyx_sq_item_memoryview, /*sq_item*/
21076  0, /*sq_slice*/
21077  0, /*sq_ass_item*/
21078  0, /*sq_ass_slice*/
21079  0, /*sq_contains*/
21080  0, /*sq_inplace_concat*/
21081  0, /*sq_inplace_repeat*/
21082 };
21083 
21084 static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
21085  __pyx_memoryview___len__, /*mp_length*/
21086  __pyx_memoryview___getitem__, /*mp_subscript*/
21087  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
21088 };
21089 
21090 static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
21091  #if PY_MAJOR_VERSION < 3
21092  0, /*bf_getreadbuffer*/
21093  #endif
21094  #if PY_MAJOR_VERSION < 3
21095  0, /*bf_getwritebuffer*/
21096  #endif
21097  #if PY_MAJOR_VERSION < 3
21098  0, /*bf_getsegcount*/
21099  #endif
21100  #if PY_MAJOR_VERSION < 3
21101  0, /*bf_getcharbuffer*/
21102  #endif
21103  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
21104  0, /*bf_releasebuffer*/
21105 };
21106 
21107 static PyTypeObject __pyx_type___pyx_memoryview = {
21108  PyVarObject_HEAD_INIT(0, 0)
21109  "imate._c_linear_operator.py_c_linear_operator.memoryview", /*tp_name*/
21110  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
21111  0, /*tp_itemsize*/
21112  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
21113  #if PY_VERSION_HEX < 0x030800b4
21114  0, /*tp_print*/
21115  #endif
21116  #if PY_VERSION_HEX >= 0x030800b4
21117  0, /*tp_vectorcall_offset*/
21118  #endif
21119  0, /*tp_getattr*/
21120  0, /*tp_setattr*/
21121  #if PY_MAJOR_VERSION < 3
21122  0, /*tp_compare*/
21123  #endif
21124  #if PY_MAJOR_VERSION >= 3
21125  0, /*tp_as_async*/
21126  #endif
21127  __pyx_memoryview___repr__, /*tp_repr*/
21128  0, /*tp_as_number*/
21129  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
21130  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
21131  0, /*tp_hash*/
21132  0, /*tp_call*/
21133  __pyx_memoryview___str__, /*tp_str*/
21134  0, /*tp_getattro*/
21135  0, /*tp_setattro*/
21136  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
21137  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
21138  0, /*tp_doc*/
21139  __pyx_tp_traverse_memoryview, /*tp_traverse*/
21140  __pyx_tp_clear_memoryview, /*tp_clear*/
21141  0, /*tp_richcompare*/
21142  0, /*tp_weaklistoffset*/
21143  0, /*tp_iter*/
21144  0, /*tp_iternext*/
21145  __pyx_methods_memoryview, /*tp_methods*/
21146  0, /*tp_members*/
21147  __pyx_getsets_memoryview, /*tp_getset*/
21148  0, /*tp_base*/
21149  0, /*tp_dict*/
21150  0, /*tp_descr_get*/
21151  0, /*tp_descr_set*/
21152  0, /*tp_dictoffset*/
21153  0, /*tp_init*/
21154  0, /*tp_alloc*/
21155  __pyx_tp_new_memoryview, /*tp_new*/
21156  0, /*tp_free*/
21157  0, /*tp_is_gc*/
21158  0, /*tp_bases*/
21159  0, /*tp_mro*/
21160  0, /*tp_cache*/
21161  0, /*tp_subclasses*/
21162  0, /*tp_weaklist*/
21163  0, /*tp_del*/
21164  0, /*tp_version_tag*/
21165  #if PY_VERSION_HEX >= 0x030400a1
21166  0, /*tp_finalize*/
21167  #endif
21168  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
21169  0, /*tp_vectorcall*/
21170  #endif
21171  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
21172  0, /*tp_print*/
21173  #endif
21174  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
21175  0, /*tp_pypy_flags*/
21176  #endif
21177 };
21178 static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
21179 
21180 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
21181  struct __pyx_memoryviewslice_obj *p;
21182  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
21183  if (unlikely(!o)) return 0;
21184  p = ((struct __pyx_memoryviewslice_obj *)o);
21185  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
21186  p->from_object = Py_None; Py_INCREF(Py_None);
21187  p->from_slice.memview = NULL;
21188  return o;
21189 }
21190 
21191 static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
21192  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
21193  #if CYTHON_USE_TP_FINALIZE
21194  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !__Pyx_PyObject_GC_IsFinalized(o)) {
21195  if (PyObject_CallFinalizerFromDealloc(o)) return;
21196  }
21197  #endif
21198  PyObject_GC_UnTrack(o);
21199  {
21200  PyObject *etype, *eval, *etb;
21201  PyErr_Fetch(&etype, &eval, &etb);
21202  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
21203  __pyx_memoryviewslice___dealloc__(o);
21204  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
21205  PyErr_Restore(etype, eval, etb);
21206  }
21207  Py_CLEAR(p->from_object);
21208  PyObject_GC_Track(o);
21209  __pyx_tp_dealloc_memoryview(o);
21210 }
21211 
21212 static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
21213  int e;
21214  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
21215  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
21216  if (p->from_object) {
21217  e = (*v)(p->from_object, a); if (e) return e;
21218  }
21219  return 0;
21220 }
21221 
21222 static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
21223  PyObject* tmp;
21224  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
21225  __pyx_tp_clear_memoryview(o);
21226  tmp = ((PyObject*)p->from_object);
21227  p->from_object = Py_None; Py_INCREF(Py_None);
21228  Py_XDECREF(tmp);
21229  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
21230  return 0;
21231 }
21232 
21233 static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
21234  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
21235 }
21236 
21237 static PyMethodDef __pyx_methods__memoryviewslice[] = {
21238  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
21239  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
21240  {0, 0, 0, 0}
21241 };
21242 
21243 static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
21244  {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
21245  {0, 0, 0, 0, 0}
21246 };
21247 
21248 static PyTypeObject __pyx_type___pyx_memoryviewslice = {
21249  PyVarObject_HEAD_INIT(0, 0)
21250  "imate._c_linear_operator.py_c_linear_operator._memoryviewslice", /*tp_name*/
21251  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
21252  0, /*tp_itemsize*/
21253  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
21254  #if PY_VERSION_HEX < 0x030800b4
21255  0, /*tp_print*/
21256  #endif
21257  #if PY_VERSION_HEX >= 0x030800b4
21258  0, /*tp_vectorcall_offset*/
21259  #endif
21260  0, /*tp_getattr*/
21261  0, /*tp_setattr*/
21262  #if PY_MAJOR_VERSION < 3
21263  0, /*tp_compare*/
21264  #endif
21265  #if PY_MAJOR_VERSION >= 3
21266  0, /*tp_as_async*/
21267  #endif
21268  #if CYTHON_COMPILING_IN_PYPY
21269  __pyx_memoryview___repr__, /*tp_repr*/
21270  #else
21271  0, /*tp_repr*/
21272  #endif
21273  0, /*tp_as_number*/
21274  0, /*tp_as_sequence*/
21275  0, /*tp_as_mapping*/
21276  0, /*tp_hash*/
21277  0, /*tp_call*/
21278  #if CYTHON_COMPILING_IN_PYPY
21279  __pyx_memoryview___str__, /*tp_str*/
21280  #else
21281  0, /*tp_str*/
21282  #endif
21283  0, /*tp_getattro*/
21284  0, /*tp_setattro*/
21285  0, /*tp_as_buffer*/
21286  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
21287  "Internal class for passing memoryview slices to Python", /*tp_doc*/
21288  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
21289  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
21290  0, /*tp_richcompare*/
21291  0, /*tp_weaklistoffset*/
21292  0, /*tp_iter*/
21293  0, /*tp_iternext*/
21294  __pyx_methods__memoryviewslice, /*tp_methods*/
21295  0, /*tp_members*/
21296  __pyx_getsets__memoryviewslice, /*tp_getset*/
21297  0, /*tp_base*/
21298  0, /*tp_dict*/
21299  0, /*tp_descr_get*/
21300  0, /*tp_descr_set*/
21301  0, /*tp_dictoffset*/
21302  0, /*tp_init*/
21303  0, /*tp_alloc*/
21304  __pyx_tp_new__memoryviewslice, /*tp_new*/
21305  0, /*tp_free*/
21306  0, /*tp_is_gc*/
21307  0, /*tp_bases*/
21308  0, /*tp_mro*/
21309  0, /*tp_cache*/
21310  0, /*tp_subclasses*/
21311  0, /*tp_weaklist*/
21312  0, /*tp_del*/
21313  0, /*tp_version_tag*/
21314  #if PY_VERSION_HEX >= 0x030400a1
21315  0, /*tp_finalize*/
21316  #endif
21317  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
21318  0, /*tp_vectorcall*/
21319  #endif
21320  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
21321  0, /*tp_print*/
21322  #endif
21323  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
21324  0, /*tp_pypy_flags*/
21325  #endif
21326 };
21327 
21328 static PyMethodDef __pyx_methods[] = {
21329  {0, 0, 0, 0}
21330 };
21331 
21332 #if PY_MAJOR_VERSION >= 3
21333 #if CYTHON_PEP489_MULTI_PHASE_INIT
21334 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
21335 static int __pyx_pymod_exec_py_c_linear_operator(PyObject* module); /*proto*/
21336 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
21337  {Py_mod_create, (void*)__pyx_pymod_create},
21338  {Py_mod_exec, (void*)__pyx_pymod_exec_py_c_linear_operator},
21339  {0, NULL}
21340 };
21341 #endif
21342 
21343 static struct PyModuleDef __pyx_moduledef = {
21344  PyModuleDef_HEAD_INIT,
21345  "py_c_linear_operator",
21346  0, /* m_doc */
21347  #if CYTHON_PEP489_MULTI_PHASE_INIT
21348  0, /* m_size */
21349  #else
21350  -1, /* m_size */
21351  #endif
21352  __pyx_methods /* m_methods */,
21353  #if CYTHON_PEP489_MULTI_PHASE_INIT
21354  __pyx_moduledef_slots, /* m_slots */
21355  #else
21356  NULL, /* m_reload */
21357  #endif
21358  NULL, /* m_traverse */
21359  NULL, /* m_clear */
21360  NULL /* m_free */
21361 };
21362 #endif
21363 #ifndef CYTHON_SMALL_CODE
21364 #if defined(__clang__)
21365  #define CYTHON_SMALL_CODE
21366 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
21367  #define CYTHON_SMALL_CODE __attribute__((cold))
21368 #else
21369  #define CYTHON_SMALL_CODE
21370 #endif
21371 #endif
21372 
21373 static __Pyx_StringTabEntry __pyx_string_tab[] = {
21374  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
21375  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
21376  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
21377  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
21378  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
21379  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
21380  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
21381  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
21382  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
21383  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
21384  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
21385  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
21386  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
21387  {&__pyx_kp_u_LinearOperator_object_is_s, __pyx_k_LinearOperator_object_is_s, sizeof(__pyx_k_LinearOperator_object_is_s), 0, 1, 0, 0},
21388  {&__pyx_kp_u_Linear_operator_data_type_is_not, __pyx_k_Linear_operator_data_type_is_not, sizeof(__pyx_k_Linear_operator_data_type_is_not), 0, 1, 0, 0},
21389  {&__pyx_kp_u_Linear_operator_double_type_is_n, __pyx_k_Linear_operator_double_type_is_n, sizeof(__pyx_k_Linear_operator_double_type_is_n), 0, 1, 0, 0},
21390  {&__pyx_kp_u_Linear_operator_float_type_is_no, __pyx_k_Linear_operator_float_type_is_no, sizeof(__pyx_k_Linear_operator_float_type_is_no), 0, 1, 0, 0},
21391  {&__pyx_kp_u_Linear_operator_is_not_set, __pyx_k_Linear_operator_is_not_set, sizeof(__pyx_k_Linear_operator_is_not_set), 0, 1, 0, 0},
21392  {&__pyx_kp_u_Linear_operator_long_double_type, __pyx_k_Linear_operator_long_double_type, sizeof(__pyx_k_Linear_operator_long_double_type), 0, 1, 0, 0},
21393  {&__pyx_kp_u_LongIndexType_has_an_unconventi, __pyx_k_LongIndexType_has_an_unconventi, sizeof(__pyx_k_LongIndexType_has_an_unconventi), 0, 1, 0, 0},
21394  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
21395  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
21396  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
21397  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
21398  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
21399  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
21400  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
21401  {&__pyx_kp_u_The_input_vector_and_product_sho, __pyx_k_The_input_vector_and_product_sho, sizeof(__pyx_k_The_input_vector_and_product_sho), 0, 1, 0, 0},
21402  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
21403  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
21404  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
21405  {&__pyx_kp_u_Vector_type_should_be_either_flo, __pyx_k_Vector_type_should_be_either_flo, sizeof(__pyx_k_Vector_type_should_be_either_flo), 0, 1, 0, 0},
21406  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
21407  {&__pyx_kp_u_Wrong_accessors_is_called_The_ty, __pyx_k_Wrong_accessors_is_called_The_ty, sizeof(__pyx_k_Wrong_accessors_is_called_The_ty), 0, 1, 0, 0},
21408  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
21409  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
21410  {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1},
21411  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
21412  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
21413  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
21414  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
21415  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
21416  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
21417  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
21418  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
21419  {&__pyx_n_s_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 0, 0, 1, 1},
21420  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
21421  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
21422  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
21423  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
21424  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
21425  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
21426  {&__pyx_n_b_float128, __pyx_k_float128, sizeof(__pyx_k_float128), 0, 0, 0, 1},
21427  {&__pyx_n_u_float128, __pyx_k_float128, sizeof(__pyx_k_float128), 0, 1, 0, 1},
21428  {&__pyx_n_b_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 0, 0, 1},
21429  {&__pyx_n_u_float32, __pyx_k_float32, sizeof(__pyx_k_float32), 0, 1, 0, 1},
21430  {&__pyx_n_b_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 0, 1},
21431  {&__pyx_n_u_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 1, 0, 1},
21432  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
21433  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
21434  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
21435  {&__pyx_n_s_get_data_type_name, __pyx_k_get_data_type_name, sizeof(__pyx_k_get_data_type_name), 0, 0, 1, 1},
21436  {&__pyx_n_s_get_num_parameters, __pyx_k_get_num_parameters, sizeof(__pyx_k_get_num_parameters), 0, 0, 1, 1},
21437  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
21438  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
21439  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
21440  {&__pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_k_imate__c_linear_operator_py_c_li, sizeof(__pyx_k_imate__c_linear_operator_py_c_li), 0, 0, 1, 0},
21441  {&__pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_k_imate__c_linear_operator_py_c_li_2, sizeof(__pyx_k_imate__c_linear_operator_py_c_li_2), 0, 0, 1, 1},
21442  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
21443  {&__pyx_n_s_isscalar, __pyx_k_isscalar, sizeof(__pyx_k_isscalar), 0, 0, 1, 1},
21444  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
21445  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
21446  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
21447  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
21448  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
21449  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
21450  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
21451  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
21452  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
21453  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
21454  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
21455  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
21456  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
21457  {&__pyx_n_s_parameters, __pyx_k_parameters, sizeof(__pyx_k_parameters), 0, 0, 1, 1},
21458  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
21459  {&__pyx_n_s_product, __pyx_k_product, sizeof(__pyx_k_product), 0, 0, 1, 1},
21460  {&__pyx_n_s_pycLinearOperator, __pyx_k_pycLinearOperator, sizeof(__pyx_k_pycLinearOperator), 0, 0, 1, 1},
21461  {&__pyx_n_s_pycLinearOperator___reduce_cytho, __pyx_k_pycLinearOperator___reduce_cytho, sizeof(__pyx_k_pycLinearOperator___reduce_cytho), 0, 0, 1, 1},
21462  {&__pyx_n_s_pycLinearOperator___setstate_cyt, __pyx_k_pycLinearOperator___setstate_cyt, sizeof(__pyx_k_pycLinearOperator___setstate_cyt), 0, 0, 1, 1},
21463  {&__pyx_n_s_pycLinearOperator_dot, __pyx_k_pycLinearOperator_dot, sizeof(__pyx_k_pycLinearOperator_dot), 0, 0, 1, 1},
21464  {&__pyx_n_s_pycLinearOperator_get_data_type, __pyx_k_pycLinearOperator_get_data_type, sizeof(__pyx_k_pycLinearOperator_get_data_type), 0, 0, 1, 1},
21465  {&__pyx_n_s_pycLinearOperator_get_num_parame, __pyx_k_pycLinearOperator_get_num_parame, sizeof(__pyx_k_pycLinearOperator_get_num_parame), 0, 0, 1, 1},
21466  {&__pyx_n_s_pycLinearOperator_set_parameters, __pyx_k_pycLinearOperator_set_parameters, sizeof(__pyx_k_pycLinearOperator_set_parameters), 0, 0, 1, 1},
21467  {&__pyx_n_s_pycLinearOperator_transpose_dot, __pyx_k_pycLinearOperator_transpose_dot, sizeof(__pyx_k_pycLinearOperator_transpose_dot), 0, 0, 1, 1},
21468  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
21469  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
21470  {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
21471  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
21472  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
21473  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
21474  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
21475  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
21476  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
21477  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
21478  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
21479  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
21480  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
21481  {&__pyx_n_s_set_parameters, __pyx_k_set_parameters, sizeof(__pyx_k_set_parameters), 0, 0, 1, 1},
21482  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
21483  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
21484  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
21485  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
21486  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
21487  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
21488  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
21489  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
21490  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
21491  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
21492  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
21493  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
21494  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
21495  {&__pyx_n_s_transpose_dot, __pyx_k_transpose_dot, sizeof(__pyx_k_transpose_dot), 0, 0, 1, 1},
21496  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
21497  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
21498  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
21499  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
21500  {&__pyx_n_s_vector, __pyx_k_vector, sizeof(__pyx_k_vector), 0, 0, 1, 1},
21501  {0, 0, 0, 0, 0, 0, 0}
21502 };
21503 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
21504  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 67, __pyx_L1_error)
21505  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 107, __pyx_L1_error)
21506  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 158, __pyx_L1_error)
21507  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 149, __pyx_L1_error)
21508  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 152, __pyx_L1_error)
21509  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 181, __pyx_L1_error)
21510  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 406, __pyx_L1_error)
21511  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 615, __pyx_L1_error)
21512  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 834, __pyx_L1_error)
21513  return 0;
21514  __pyx_L1_error:;
21515  return -1;
21516 }
21517 
21518 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
21519  __Pyx_RefNannyDeclarations
21520  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
21521 
21522  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":67
21523  * self.long_index_type_name = r'int64'
21524  * else:
21525  * raise TypeError('"LongIndexType" has an unconventional byte size.') # <<<<<<<<<<<<<<
21526  *
21527  * # ===========
21528  */
21529  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_LongIndexType_has_an_unconventi); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 67, __pyx_L1_error)
21530  __Pyx_GOTREF(__pyx_tuple_);
21531  __Pyx_GIVEREF(__pyx_tuple_);
21532 
21533  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":107
21534  * return self.Aop_long_double.get_num_rows()
21535  * else:
21536  * raise ValueError('Linear operator is not set.') # <<<<<<<<<<<<<<
21537  *
21538  * # ===============
21539  */
21540  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_Linear_operator_is_not_set); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 107, __pyx_L1_error)
21541  __Pyx_GOTREF(__pyx_tuple__2);
21542  __Pyx_GIVEREF(__pyx_tuple__2);
21543 
21544  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":158
21545  *
21546  * if self.data_type_name == NULL:
21547  * raise RuntimeError('Linear operator data type is not set.') # <<<<<<<<<<<<<<
21548  *
21549  * return self.data_type_name
21550  */
21551  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Linear_operator_data_type_is_not); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 158, __pyx_L1_error)
21552  __Pyx_GOTREF(__pyx_tuple__5);
21553  __Pyx_GIVEREF(__pyx_tuple__5);
21554 
21555  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":171
21556  *
21557  * if self.Aop_float == NULL:
21558  * raise RuntimeError('Linear operator (float type) is not set.') # <<<<<<<<<<<<<<
21559  *
21560  * if self.data_type_name != b'float32':
21561  */
21562  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Linear_operator_float_type_is_no); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 171, __pyx_L1_error)
21563  __Pyx_GOTREF(__pyx_tuple__6);
21564  __Pyx_GIVEREF(__pyx_tuple__6);
21565 
21566  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":189
21567  *
21568  * if self.Aop_double == NULL:
21569  * raise RuntimeError('Linear operator (double type) is not set.') # <<<<<<<<<<<<<<
21570  *
21571  * if self.data_type_name != b'float64':
21572  */
21573  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Linear_operator_double_type_is_n); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 189, __pyx_L1_error)
21574  __Pyx_GOTREF(__pyx_tuple__7);
21575  __Pyx_GIVEREF(__pyx_tuple__7);
21576 
21577  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":208
21578  *
21579  * if self.Aop_long_double == NULL:
21580  * raise RuntimeError('Linear operator (long double type) is not ' + # <<<<<<<<<<<<<<
21581  * 'set.')
21582  *
21583  */
21584  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Linear_operator_long_double_type); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 208, __pyx_L1_error)
21585  __Pyx_GOTREF(__pyx_tuple__8);
21586  __Pyx_GIVEREF(__pyx_tuple__8);
21587 
21588  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":243
21589  *
21590  * if vector.dtype != product.dtype:
21591  * raise TypeError('The input vector and product should have ') # <<<<<<<<<<<<<<
21592  *
21593  * # Declare memory views for input vector
21594  */
21595  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_The_input_vector_and_product_sho); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 243, __pyx_L1_error)
21596  __Pyx_GOTREF(__pyx_tuple__11);
21597  __Pyx_GIVEREF(__pyx_tuple__11);
21598 
21599  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":335
21600  *
21601  * else:
21602  * raise TypeError('Vector type should be either "float32", ' + # <<<<<<<<<<<<<<
21603  * '"float64", or "float128".')
21604  *
21605  */
21606  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_Vector_type_should_be_either_flo); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 335, __pyx_L1_error)
21607  __Pyx_GOTREF(__pyx_tuple__12);
21608  __Pyx_GIVEREF(__pyx_tuple__12);
21609 
21610  /* "(tree fragment)":2
21611  * def __reduce_cython__(self):
21612  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21613  * def __setstate_cython__(self, __pyx_state):
21614  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21615  */
21616  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 2, __pyx_L1_error)
21617  __Pyx_GOTREF(__pyx_tuple__15);
21618  __Pyx_GIVEREF(__pyx_tuple__15);
21619 
21620  /* "(tree fragment)":4
21621  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21622  * def __setstate_cython__(self, __pyx_state):
21623  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21624  */
21625  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 4, __pyx_L1_error)
21626  __Pyx_GOTREF(__pyx_tuple__17);
21627  __Pyx_GIVEREF(__pyx_tuple__17);
21628 
21629  /* "View.MemoryView":134
21630  *
21631  * if not self.ndim:
21632  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
21633  *
21634  * if itemsize <= 0:
21635  */
21636  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 134, __pyx_L1_error)
21637  __Pyx_GOTREF(__pyx_tuple__18);
21638  __Pyx_GIVEREF(__pyx_tuple__18);
21639 
21640  /* "View.MemoryView":137
21641  *
21642  * if itemsize <= 0:
21643  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
21644  *
21645  * if not isinstance(format, bytes):
21646  */
21647  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 137, __pyx_L1_error)
21648  __Pyx_GOTREF(__pyx_tuple__19);
21649  __Pyx_GIVEREF(__pyx_tuple__19);
21650 
21651  /* "View.MemoryView":149
21652  *
21653  * if not self._shape:
21654  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
21655  *
21656  *
21657  */
21658  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 149, __pyx_L1_error)
21659  __Pyx_GOTREF(__pyx_tuple__20);
21660  __Pyx_GIVEREF(__pyx_tuple__20);
21661 
21662  /* "View.MemoryView":177
21663  * self.data = <char *>malloc(self.len)
21664  * if not self.data:
21665  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
21666  *
21667  * if self.dtype_is_object:
21668  */
21669  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 177, __pyx_L1_error)
21670  __Pyx_GOTREF(__pyx_tuple__21);
21671  __Pyx_GIVEREF(__pyx_tuple__21);
21672 
21673  /* "View.MemoryView":193
21674  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21675  * if not (flags & bufmode):
21676  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
21677  * info.buf = self.data
21678  * info.len = self.len
21679  */
21680  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 193, __pyx_L1_error)
21681  __Pyx_GOTREF(__pyx_tuple__22);
21682  __Pyx_GIVEREF(__pyx_tuple__22);
21683 
21684  /* "(tree fragment)":2
21685  * def __reduce_cython__(self):
21686  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21687  * def __setstate_cython__(self, __pyx_state):
21688  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21689  */
21690  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 2, __pyx_L1_error)
21691  __Pyx_GOTREF(__pyx_tuple__23);
21692  __Pyx_GIVEREF(__pyx_tuple__23);
21693 
21694  /* "(tree fragment)":4
21695  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21696  * def __setstate_cython__(self, __pyx_state):
21697  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21698  */
21699  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 4, __pyx_L1_error)
21700  __Pyx_GOTREF(__pyx_tuple__24);
21701  __Pyx_GIVEREF(__pyx_tuple__24);
21702 
21703  /* "View.MemoryView":420
21704  * def __setitem__(memoryview self, object index, object value):
21705  * if self.view.readonly:
21706  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
21707  *
21708  * have_slices, index = _unellipsify(index, self.view.ndim)
21709  */
21710  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 420, __pyx_L1_error)
21711  __Pyx_GOTREF(__pyx_tuple__25);
21712  __Pyx_GIVEREF(__pyx_tuple__25);
21713 
21714  /* "View.MemoryView":497
21715  * result = struct.unpack(self.view.format, bytesitem)
21716  * except struct.error:
21717  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
21718  * else:
21719  * if len(self.view.format) == 1:
21720  */
21721  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 497, __pyx_L1_error)
21722  __Pyx_GOTREF(__pyx_tuple__26);
21723  __Pyx_GIVEREF(__pyx_tuple__26);
21724 
21725  /* "View.MemoryView":522
21726  * def __getbuffer__(self, Py_buffer *info, int flags):
21727  * if flags & PyBUF_WRITABLE and self.view.readonly:
21728  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
21729  *
21730  * if flags & PyBUF_ND:
21731  */
21732  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 522, __pyx_L1_error)
21733  __Pyx_GOTREF(__pyx_tuple__27);
21734  __Pyx_GIVEREF(__pyx_tuple__27);
21735 
21736  /* "View.MemoryView":572
21737  * if self.view.strides == NULL:
21738  *
21739  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
21740  *
21741  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
21742  */
21743  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 572, __pyx_L1_error)
21744  __Pyx_GOTREF(__pyx_tuple__28);
21745  __Pyx_GIVEREF(__pyx_tuple__28);
21746 
21747  /* "View.MemoryView":579
21748  * def suboffsets(self):
21749  * if self.view.suboffsets == NULL:
21750  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
21751  *
21752  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
21753  */
21754  __pyx_tuple__29 = PyTuple_New(1); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 579, __pyx_L1_error)
21755  __Pyx_GOTREF(__pyx_tuple__29);
21756  __Pyx_INCREF(__pyx_int_neg_1);
21757  __Pyx_GIVEREF(__pyx_int_neg_1);
21758  PyTuple_SET_ITEM(__pyx_tuple__29, 0, __pyx_int_neg_1);
21759  __Pyx_GIVEREF(__pyx_tuple__29);
21760 
21761  /* "(tree fragment)":2
21762  * def __reduce_cython__(self):
21763  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21764  * def __setstate_cython__(self, __pyx_state):
21765  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21766  */
21767  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 2, __pyx_L1_error)
21768  __Pyx_GOTREF(__pyx_tuple__30);
21769  __Pyx_GIVEREF(__pyx_tuple__30);
21770 
21771  /* "(tree fragment)":4
21772  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21773  * def __setstate_cython__(self, __pyx_state):
21774  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21775  */
21776  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 4, __pyx_L1_error)
21777  __Pyx_GOTREF(__pyx_tuple__31);
21778  __Pyx_GIVEREF(__pyx_tuple__31);
21779 
21780  /* "View.MemoryView":684
21781  * if item is Ellipsis:
21782  * if not seen_ellipsis:
21783  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
21784  * seen_ellipsis = True
21785  * else:
21786  */
21787  __pyx_slice__32 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__32)) __PYX_ERR(1, 684, __pyx_L1_error)
21788  __Pyx_GOTREF(__pyx_slice__32);
21789  __Pyx_GIVEREF(__pyx_slice__32);
21790 
21791  /* "View.MemoryView":705
21792  * for suboffset in suboffsets[:ndim]:
21793  * if suboffset >= 0:
21794  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
21795  *
21796  *
21797  */
21798  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 705, __pyx_L1_error)
21799  __Pyx_GOTREF(__pyx_tuple__33);
21800  __Pyx_GIVEREF(__pyx_tuple__33);
21801 
21802  /* "(tree fragment)":2
21803  * def __reduce_cython__(self):
21804  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21805  * def __setstate_cython__(self, __pyx_state):
21806  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21807  */
21808  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 2, __pyx_L1_error)
21809  __Pyx_GOTREF(__pyx_tuple__34);
21810  __Pyx_GIVEREF(__pyx_tuple__34);
21811 
21812  /* "(tree fragment)":4
21813  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21814  * def __setstate_cython__(self, __pyx_state):
21815  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
21816  */
21817  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 4, __pyx_L1_error)
21818  __Pyx_GOTREF(__pyx_tuple__35);
21819  __Pyx_GIVEREF(__pyx_tuple__35);
21820  __pyx_tuple__37 = PyTuple_Pack(3, __pyx_int_184977713, __pyx_int_136983863, __pyx_int_112105877); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(1, 4, __pyx_L1_error)
21821  __Pyx_GOTREF(__pyx_tuple__37);
21822  __Pyx_GIVEREF(__pyx_tuple__37);
21823 
21824  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":133
21825  * # ==================
21826  *
21827  * def get_num_parameters(self): # <<<<<<<<<<<<<<
21828  * """
21829  * :return: Number of parameters.
21830  */
21831  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 133, __pyx_L1_error)
21832  __Pyx_GOTREF(__pyx_tuple__38);
21833  __Pyx_GIVEREF(__pyx_tuple__38);
21834  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_n_s_get_num_parameters, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 133, __pyx_L1_error)
21835 
21836  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":153
21837  * # ==================
21838  *
21839  * def get_data_type_name(self): # <<<<<<<<<<<<<<
21840  * """
21841  * """
21842  */
21843  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 153, __pyx_L1_error)
21844  __Pyx_GOTREF(__pyx_tuple__39);
21845  __Pyx_GIVEREF(__pyx_tuple__39);
21846  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_n_s_get_data_type_name, 153, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 153, __pyx_L1_error)
21847 
21848  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":222
21849  * # ==============
21850  *
21851  * def set_parameters(self, parameters_): # <<<<<<<<<<<<<<
21852  * """
21853  * This function is only used for the test unit of this class. For the
21854  */
21855  __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_parameters); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 222, __pyx_L1_error)
21856  __Pyx_GOTREF(__pyx_tuple__40);
21857  __Pyx_GIVEREF(__pyx_tuple__40);
21858  __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_n_s_set_parameters, 222, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 222, __pyx_L1_error)
21859 
21860  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":238
21861  * # ===
21862  *
21863  * cpdef void dot(self, vector, product) except *: # <<<<<<<<<<<<<<
21864  * """
21865  * """
21866  */
21867  __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_vector, __pyx_n_s_product); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 238, __pyx_L1_error)
21868  __Pyx_GOTREF(__pyx_tuple__41);
21869  __Pyx_GIVEREF(__pyx_tuple__41);
21870  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_n_s_dot, 238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 238, __pyx_L1_error)
21871 
21872  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":342
21873  * # =============
21874  *
21875  * cpdef void transpose_dot(self, vector, product) except *: # <<<<<<<<<<<<<<
21876  * """
21877  * """
21878  */
21879  __pyx_tuple__42 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_vector, __pyx_n_s_product); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 342, __pyx_L1_error)
21880  __Pyx_GOTREF(__pyx_tuple__42);
21881  __Pyx_GIVEREF(__pyx_tuple__42);
21882  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_imate__c_linear_operator_py_c_li, __pyx_n_s_transpose_dot, 342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 342, __pyx_L1_error)
21883 
21884  /* "(tree fragment)":1
21885  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
21886  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21887  * def __setstate_cython__(self, __pyx_state):
21888  */
21889  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(1, 1, __pyx_L1_error)
21890  __Pyx_GOTREF(__pyx_tuple__43);
21891  __Pyx_GIVEREF(__pyx_tuple__43);
21892  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(1, 1, __pyx_L1_error)
21893 
21894  /* "(tree fragment)":3
21895  * def __reduce_cython__(self):
21896  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21897  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
21898  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
21899  */
21900  __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 3, __pyx_L1_error)
21901  __Pyx_GOTREF(__pyx_tuple__44);
21902  __Pyx_GIVEREF(__pyx_tuple__44);
21903  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(1, 3, __pyx_L1_error)
21904 
21905  /* "View.MemoryView":287
21906  * return self.name
21907  *
21908  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
21909  * cdef strided = Enum("<strided and direct>") # default
21910  * cdef indirect = Enum("<strided and indirect>")
21911  */
21912  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(1, 287, __pyx_L1_error)
21913  __Pyx_GOTREF(__pyx_tuple__45);
21914  __Pyx_GIVEREF(__pyx_tuple__45);
21915 
21916  /* "View.MemoryView":288
21917  *
21918  * cdef generic = Enum("<strided and direct or indirect>")
21919  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
21920  * cdef indirect = Enum("<strided and indirect>")
21921  *
21922  */
21923  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 288, __pyx_L1_error)
21924  __Pyx_GOTREF(__pyx_tuple__46);
21925  __Pyx_GIVEREF(__pyx_tuple__46);
21926 
21927  /* "View.MemoryView":289
21928  * cdef generic = Enum("<strided and direct or indirect>")
21929  * cdef strided = Enum("<strided and direct>") # default
21930  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
21931  *
21932  *
21933  */
21934  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(1, 289, __pyx_L1_error)
21935  __Pyx_GOTREF(__pyx_tuple__47);
21936  __Pyx_GIVEREF(__pyx_tuple__47);
21937 
21938  /* "View.MemoryView":292
21939  *
21940  *
21941  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
21942  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
21943  *
21944  */
21945  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 292, __pyx_L1_error)
21946  __Pyx_GOTREF(__pyx_tuple__48);
21947  __Pyx_GIVEREF(__pyx_tuple__48);
21948 
21949  /* "View.MemoryView":293
21950  *
21951  * cdef contiguous = Enum("<contiguous and direct>")
21952  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
21953  *
21954  *
21955  */
21956  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 293, __pyx_L1_error)
21957  __Pyx_GOTREF(__pyx_tuple__49);
21958  __Pyx_GIVEREF(__pyx_tuple__49);
21959 
21960  /* "(tree fragment)":1
21961  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
21962  * cdef object __pyx_PickleError
21963  * cdef object __pyx_result
21964  */
21965  __pyx_tuple__50 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(1, 1, __pyx_L1_error)
21966  __Pyx_GOTREF(__pyx_tuple__50);
21967  __Pyx_GIVEREF(__pyx_tuple__50);
21968  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(1, 1, __pyx_L1_error)
21969  __Pyx_RefNannyFinishContext();
21970  return 0;
21971  __pyx_L1_error:;
21972  __Pyx_RefNannyFinishContext();
21973  return -1;
21974 }
21975 
21976 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
21977  /* AssertionsEnabled.init */
21978  __Pyx_init_assertions_enabled();
21979 
21980 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
21981 
21982  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
21983  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
21984  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
21985  __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)
21986  __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)
21987  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
21988  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
21989  return 0;
21990  __pyx_L1_error:;
21991  return -1;
21992 }
21993 
21994 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
21995 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
21996 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
21997 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
21998 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
21999 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
22000 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
22001 
22002 static int __Pyx_modinit_global_init_code(void) {
22003  __Pyx_RefNannyDeclarations
22004  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
22005  /*--- Global init code ---*/
22006  generic = Py_None; Py_INCREF(Py_None);
22007  strided = Py_None; Py_INCREF(Py_None);
22008  indirect = Py_None; Py_INCREF(Py_None);
22009  contiguous = Py_None; Py_INCREF(Py_None);
22010  indirect_contiguous = Py_None; Py_INCREF(Py_None);
22011  __Pyx_RefNannyFinishContext();
22012  return 0;
22013 }
22014 
22015 static int __Pyx_modinit_variable_export_code(void) {
22016  __Pyx_RefNannyDeclarations
22017  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
22018  /*--- Variable export code ---*/
22019  __Pyx_RefNannyFinishContext();
22020  return 0;
22021 }
22022 
22023 static int __Pyx_modinit_function_export_code(void) {
22024  __Pyx_RefNannyDeclarations
22025  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
22026  /*--- Function export code ---*/
22027  __Pyx_RefNannyFinishContext();
22028  return 0;
22029 }
22030 
22031 static int __Pyx_modinit_type_init_code(void) {
22032  __Pyx_RefNannyDeclarations
22033  int __pyx_lineno = 0;
22034  const char *__pyx_filename = NULL;
22035  int __pyx_clineno = 0;
22036  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
22037  /*--- Type init code ---*/
22038  __pyx_vtabptr_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator = &__pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
22039  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.get_num_rows = (__pyx_t_5imate_12_definitions_5types_LongIndexType (*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_rows;
22040  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.get_num_columns = (__pyx_t_5imate_12_definitions_5types_LongIndexType (*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_num_columns;
22041  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.get_linear_operator_float = (cLinearOperator<float> *(*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_float;
22042  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.get_linear_operator_double = (cLinearOperator<double> *(*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_double;
22043  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.get_linear_operator_long_double = (cLinearOperator<long double> *(*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_get_linear_operator_long_double;
22044  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.dot = (void (*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_dot;
22045  __pyx_vtable_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.transpose_dot = (void (*)(struct __pyx_obj_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_transpose_dot;
22046  if (PyType_Ready(&__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
22047  #if PY_VERSION_HEX < 0x030800B1
22048  __pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.tp_print = 0;
22049  #endif
22050  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.tp_dictoffset && __pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.tp_getattro == PyObject_GenericGetAttr)) {
22051  __pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.tp_getattro = __Pyx_PyObject_GenericGetAttr;
22052  }
22053  if (__Pyx_SetVtable(__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator.tp_dict, __pyx_vtabptr_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
22054  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pycLinearOperator, (PyObject *)&__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
22055  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
22056  __pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator = &__pyx_type_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator;
22057  __pyx_vtabptr_array = &__pyx_vtable_array;
22058  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
22059  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 106, __pyx_L1_error)
22060  #if PY_VERSION_HEX < 0x030800B1
22061  __pyx_type___pyx_array.tp_print = 0;
22062  #endif
22063  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 106, __pyx_L1_error)
22064  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 106, __pyx_L1_error)
22065  __pyx_array_type = &__pyx_type___pyx_array;
22066  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 280, __pyx_L1_error)
22067  #if PY_VERSION_HEX < 0x030800B1
22068  __pyx_type___pyx_MemviewEnum.tp_print = 0;
22069  #endif
22070  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
22071  __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
22072  }
22073  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 280, __pyx_L1_error)
22074  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
22075  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
22076  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
22077  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
22078  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
22079  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
22080  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
22081  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
22082  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
22083  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 331, __pyx_L1_error)
22084  #if PY_VERSION_HEX < 0x030800B1
22085  __pyx_type___pyx_memoryview.tp_print = 0;
22086  #endif
22087  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
22088  __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
22089  }
22090  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 331, __pyx_L1_error)
22091  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 331, __pyx_L1_error)
22092  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
22093  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
22094  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
22095  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
22096  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
22097  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
22098  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 967, __pyx_L1_error)
22099  #if PY_VERSION_HEX < 0x030800B1
22100  __pyx_type___pyx_memoryviewslice.tp_print = 0;
22101  #endif
22102  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
22103  __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
22104  }
22105  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 967, __pyx_L1_error)
22106  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 967, __pyx_L1_error)
22107  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
22108  __Pyx_RefNannyFinishContext();
22109  return 0;
22110  __pyx_L1_error:;
22111  __Pyx_RefNannyFinishContext();
22112  return -1;
22113 }
22114 
22115 static int __Pyx_modinit_type_import_code(void) {
22116  __Pyx_RefNannyDeclarations
22117  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
22118  /*--- Type import code ---*/
22119  __Pyx_RefNannyFinishContext();
22120  return 0;
22121 }
22122 
22123 static int __Pyx_modinit_variable_import_code(void) {
22124  __Pyx_RefNannyDeclarations
22125  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
22126  /*--- Variable import code ---*/
22127  __Pyx_RefNannyFinishContext();
22128  return 0;
22129 }
22130 
22131 static int __Pyx_modinit_function_import_code(void) {
22132  __Pyx_RefNannyDeclarations
22133  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
22134  /*--- Function import code ---*/
22135  __Pyx_RefNannyFinishContext();
22136  return 0;
22137 }
22138 
22139 
22140 #ifndef CYTHON_NO_PYINIT_EXPORT
22141 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
22142 #elif PY_MAJOR_VERSION < 3
22143 #ifdef __cplusplus
22144 #define __Pyx_PyMODINIT_FUNC extern "C" void
22145 #else
22146 #define __Pyx_PyMODINIT_FUNC void
22147 #endif
22148 #else
22149 #ifdef __cplusplus
22150 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
22151 #else
22152 #define __Pyx_PyMODINIT_FUNC PyObject *
22153 #endif
22154 #endif
22155 
22156 
22157 #if PY_MAJOR_VERSION < 3
22158 __Pyx_PyMODINIT_FUNC initpy_c_linear_operator(void) CYTHON_SMALL_CODE; /*proto*/
22159 __Pyx_PyMODINIT_FUNC initpy_c_linear_operator(void)
22160 #else
22161 __Pyx_PyMODINIT_FUNC PyInit_py_c_linear_operator(void) CYTHON_SMALL_CODE; /*proto*/
22162 __Pyx_PyMODINIT_FUNC PyInit_py_c_linear_operator(void)
22163 #if CYTHON_PEP489_MULTI_PHASE_INIT
22164 {
22165  return PyModuleDef_Init(&__pyx_moduledef);
22166 }
22167 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
22168  #if PY_VERSION_HEX >= 0x030700A1
22169  static PY_INT64_T main_interpreter_id = -1;
22170  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
22171  if (main_interpreter_id == -1) {
22172  main_interpreter_id = current_id;
22173  return (unlikely(current_id == -1)) ? -1 : 0;
22174  } else if (unlikely(main_interpreter_id != current_id))
22175  #else
22176  static PyInterpreterState *main_interpreter = NULL;
22177  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
22178  if (!main_interpreter) {
22179  main_interpreter = current_interpreter;
22180  } else if (unlikely(main_interpreter != current_interpreter))
22181  #endif
22182  {
22183  PyErr_SetString(
22184  PyExc_ImportError,
22185  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
22186  return -1;
22187  }
22188  return 0;
22189 }
22190 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
22191  PyObject *value = PyObject_GetAttrString(spec, from_name);
22192  int result = 0;
22193  if (likely(value)) {
22194  if (allow_none || value != Py_None) {
22195  result = PyDict_SetItemString(moddict, to_name, value);
22196  }
22197  Py_DECREF(value);
22198  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
22199  PyErr_Clear();
22200  } else {
22201  result = -1;
22202  }
22203  return result;
22204 }
22205 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
22206  PyObject *module = NULL, *moddict, *modname;
22207  if (__Pyx_check_single_interpreter())
22208  return NULL;
22209  if (__pyx_m)
22210  return __Pyx_NewRef(__pyx_m);
22211  modname = PyObject_GetAttrString(spec, "name");
22212  if (unlikely(!modname)) goto bad;
22213  module = PyModule_NewObject(modname);
22214  Py_DECREF(modname);
22215  if (unlikely(!module)) goto bad;
22216  moddict = PyModule_GetDict(module);
22217  if (unlikely(!moddict)) goto bad;
22218  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
22219  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
22220  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
22221  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
22222  return module;
22223 bad:
22224  Py_XDECREF(module);
22225  return NULL;
22226 }
22227 
22228 
22229 static CYTHON_SMALL_CODE int __pyx_pymod_exec_py_c_linear_operator(PyObject *__pyx_pyinit_module)
22230 #endif
22231 #endif
22232 {
22233  __Pyx_TraceDeclarations
22234  PyObject *__pyx_t_1 = NULL;
22235  static PyThread_type_lock __pyx_t_2[8];
22236  int __pyx_lineno = 0;
22237  const char *__pyx_filename = NULL;
22238  int __pyx_clineno = 0;
22239  __Pyx_RefNannyDeclarations
22240  #if CYTHON_PEP489_MULTI_PHASE_INIT
22241  if (__pyx_m) {
22242  if (__pyx_m == __pyx_pyinit_module) return 0;
22243  PyErr_SetString(PyExc_RuntimeError, "Module 'py_c_linear_operator' has already been imported. Re-initialisation is not supported.");
22244  return -1;
22245  }
22246  #elif PY_MAJOR_VERSION >= 3
22247  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
22248  #endif
22249  #if CYTHON_REFNANNY
22250 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
22251 if (!__Pyx_RefNanny) {
22252  PyErr_Clear();
22253  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
22254  if (!__Pyx_RefNanny)
22255  Py_FatalError("failed to import 'refnanny' module");
22256 }
22257 #endif
22258  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_py_c_linear_operator(void)", 0);
22259  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22260  #ifdef __Pxy_PyFrame_Initialize_Offsets
22261  __Pxy_PyFrame_Initialize_Offsets();
22262  #endif
22263  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
22264  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
22265  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
22266  #ifdef __Pyx_CyFunction_USED
22267  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22268  #endif
22269  #ifdef __Pyx_FusedFunction_USED
22270  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22271  #endif
22272  #ifdef __Pyx_Coroutine_USED
22273  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22274  #endif
22275  #ifdef __Pyx_Generator_USED
22276  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22277  #endif
22278  #ifdef __Pyx_AsyncGen_USED
22279  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22280  #endif
22281  #ifdef __Pyx_StopAsyncIteration_USED
22282  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22283  #endif
22284  /*--- Library function declarations ---*/
22285  /*--- Threads initialization code ---*/
22286  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
22287  PyEval_InitThreads();
22288  #endif
22289  /*--- Module creation code ---*/
22290  #if CYTHON_PEP489_MULTI_PHASE_INIT
22291  __pyx_m = __pyx_pyinit_module;
22292  Py_INCREF(__pyx_m);
22293  #else
22294  #if PY_MAJOR_VERSION < 3
22295  __pyx_m = Py_InitModule4("py_c_linear_operator", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
22296  #else
22297  __pyx_m = PyModule_Create(&__pyx_moduledef);
22298  #endif
22299  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
22300  #endif
22301  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
22302  Py_INCREF(__pyx_d);
22303  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
22304  Py_INCREF(__pyx_b);
22305  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
22306  Py_INCREF(__pyx_cython_runtime);
22307  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22308  /*--- Initialize various global constants etc. ---*/
22309  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22310  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
22311  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22312  #endif
22313  if (__pyx_module_is_main_imate___c_linear_operator__py_c_linear_operator) {
22314  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22315  }
22316  #if PY_MAJOR_VERSION >= 3
22317  {
22318  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
22319  if (!PyDict_GetItemString(modules, "imate._c_linear_operator.py_c_linear_operator")) {
22320  if (unlikely(PyDict_SetItemString(modules, "imate._c_linear_operator.py_c_linear_operator", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
22321  }
22322  }
22323  #endif
22324  /*--- Builtin init code ---*/
22325  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22326  /*--- Constants init code ---*/
22327  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22328  /*--- Global type/function init code ---*/
22329  (void)__Pyx_modinit_global_init_code();
22330  (void)__Pyx_modinit_variable_export_code();
22331  (void)__Pyx_modinit_function_export_code();
22332  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
22333  (void)__Pyx_modinit_type_import_code();
22334  (void)__Pyx_modinit_variable_import_code();
22335  (void)__Pyx_modinit_function_import_code();
22336  /*--- Execution code ---*/
22337  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
22338  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22339  #endif
22340  __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_py_c_linear_operator(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));
22341 
22342  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":14
22343  * # =======
22344  *
22345  * import numpy # <<<<<<<<<<<<<<
22346  * from libc.stdlib cimport exit
22347  *
22348  */
22349  __Pyx_TraceLine(14,0,__PYX_ERR(0, 14, __pyx_L1_error))
22350  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
22351  __Pyx_GOTREF(__pyx_t_1);
22352  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numpy, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
22353  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22354 
22355  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":93
22356  * # ============
22357  *
22358  * cdef LongIndexType get_num_rows(self) except *: # <<<<<<<<<<<<<<
22359  * """
22360  * :return Number of rows of matrix.
22361  */
22362  __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L1_error))
22363 
22364 
22365  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":113
22366  * # ===============
22367  *
22368  * cdef LongIndexType get_num_columns(self) except *: # <<<<<<<<<<<<<<
22369  * """
22370  * :return Number of rows of matrix.
22371  */
22372  __Pyx_TraceLine(113,0,__PYX_ERR(0, 113, __pyx_L1_error))
22373 
22374 
22375  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":133
22376  * # ==================
22377  *
22378  * def get_num_parameters(self): # <<<<<<<<<<<<<<
22379  * """
22380  * :return: Number of parameters.
22381  */
22382  __Pyx_TraceLine(133,0,__PYX_ERR(0, 133, __pyx_L1_error))
22383  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_5get_num_parameters, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator_get_num_parame, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
22384  __Pyx_GOTREF(__pyx_t_1);
22385  if (PyDict_SetItem((PyObject *)__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator->tp_dict, __pyx_n_s_get_num_parameters, __pyx_t_1) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
22386  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22387  PyType_Modified(__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator);
22388 
22389  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":153
22390  * # ==================
22391  *
22392  * def get_data_type_name(self): # <<<<<<<<<<<<<<
22393  * """
22394  * """
22395  */
22396  __Pyx_TraceLine(153,0,__PYX_ERR(0, 153, __pyx_L1_error))
22397  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_7get_data_type_name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator_get_data_type, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
22398  __Pyx_GOTREF(__pyx_t_1);
22399  if (PyDict_SetItem((PyObject *)__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator->tp_dict, __pyx_n_s_get_data_type_name, __pyx_t_1) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
22400  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22401  PyType_Modified(__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator);
22402 
22403  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":166
22404  * # =========================
22405  *
22406  * cdef cLinearOperator[float]* get_linear_operator_float(self) except *: # <<<<<<<<<<<<<<
22407  * """
22408  * """
22409  */
22410  __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error))
22411 
22412 
22413  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":184
22414  * # ==========================
22415  *
22416  * cdef cLinearOperator[double]* get_linear_operator_double(self) except *: # <<<<<<<<<<<<<<
22417  * """
22418  * """
22419  */
22420  __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error))
22421 
22422 
22423  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":202
22424  * # ===============================
22425  *
22426  * cdef cLinearOperator[long double]* get_linear_operator_long_double( # <<<<<<<<<<<<<<
22427  * self) except*:
22428  * """
22429  */
22430  __Pyx_TraceLine(202,0,__PYX_ERR(0, 202, __pyx_L1_error))
22431 
22432 
22433  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":222
22434  * # ==============
22435  *
22436  * def set_parameters(self, parameters_): # <<<<<<<<<<<<<<
22437  * """
22438  * This function is only used for the test unit of this class. For the
22439  */
22440  __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error))
22441  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_9set_parameters, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator_set_parameters, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
22442  __Pyx_GOTREF(__pyx_t_1);
22443  if (PyDict_SetItem((PyObject *)__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator->tp_dict, __pyx_n_s_set_parameters, __pyx_t_1) < 0) __PYX_ERR(0, 222, __pyx_L1_error)
22444  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22445  PyType_Modified(__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator);
22446 
22447  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":238
22448  * # ===
22449  *
22450  * cpdef void dot(self, vector, product) except *: # <<<<<<<<<<<<<<
22451  * """
22452  * """
22453  */
22454  __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error))
22455 
22456  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_11dot, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator_dot, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
22457  __Pyx_GOTREF(__pyx_t_1);
22458  if (PyDict_SetItem((PyObject *)__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator->tp_dict, __pyx_n_s_dot, __pyx_t_1) < 0) __PYX_ERR(0, 238, __pyx_L1_error)
22459  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22460  PyType_Modified(__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator);
22461 
22462  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":342
22463  * # =============
22464  *
22465  * cpdef void transpose_dot(self, vector, product) except *: # <<<<<<<<<<<<<<
22466  * """
22467  * """
22468  */
22469  __Pyx_TraceLine(342,0,__PYX_ERR(0, 342, __pyx_L1_error))
22470 
22471  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_13transpose_dot, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator_transpose_dot, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
22472  __Pyx_GOTREF(__pyx_t_1);
22473  if (PyDict_SetItem((PyObject *)__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator->tp_dict, __pyx_n_s_transpose_dot, __pyx_t_1) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
22474  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22475  PyType_Modified(__pyx_ptype_5imate_18_c_linear_operator_20py_c_linear_operator_pycLinearOperator);
22476 
22477  /* "(tree fragment)":1
22478  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22479  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22480  * def __setstate_cython__(self, __pyx_state):
22481  */
22482  __Pyx_TraceLine(1,0,__PYX_ERR(1, 1, __pyx_L1_error))
22483  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator___reduce_cytho, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
22484  __Pyx_GOTREF(__pyx_t_1);
22485  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
22486  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22487 
22488  /* "(tree fragment)":3
22489  * def __reduce_cython__(self):
22490  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22491  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22492  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22493  */
22494  __Pyx_TraceLine(3,0,__PYX_ERR(1, 3, __pyx_L1_error))
22495  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_5imate_18_c_linear_operator_20py_c_linear_operator_17pycLinearOperator_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_pycLinearOperator___setstate_cyt, NULL, __pyx_n_s_imate__c_linear_operator_py_c_li_2, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
22496  __Pyx_GOTREF(__pyx_t_1);
22497  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_1) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
22498  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22499 
22500  /* "imate/_c_linear_operator/py_c_linear_operator.pyx":1
22501  * # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu> # <<<<<<<<<<<<<<
22502  * # SPDX-License-Identifier: BSD-3-Clause
22503  * # SPDX-FileType: SOURCE
22504  */
22505  __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error))
22506  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
22507  __Pyx_GOTREF(__pyx_t_1);
22508  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
22509  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22510 
22511  /* "View.MemoryView":210
22512  * info.obj = self
22513  *
22514  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
22515  *
22516  * def __dealloc__(array self):
22517  */
22518  __Pyx_TraceLine(210,0,__PYX_ERR(1, 210, __pyx_L1_error))
22519  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 210, __pyx_L1_error)
22520  __Pyx_GOTREF(__pyx_t_1);
22521  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 210, __pyx_L1_error)
22522  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22523  PyType_Modified(__pyx_array_type);
22524 
22525  /* "View.MemoryView":227
22526  *
22527  * @cname('get_memview')
22528  * cdef get_memview(self): # <<<<<<<<<<<<<<
22529  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
22530  * return memoryview(self, flags, self.dtype_is_object)
22531  */
22532  __Pyx_TraceLine(227,0,__PYX_ERR(1, 227, __pyx_L1_error))
22533 
22534 
22535  /* "View.MemoryView":245
22536  *
22537  * @cname("__pyx_array_new")
22538  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
22539  * char *mode, char *buf):
22540  * cdef array result
22541  */
22542  __Pyx_TraceLine(245,0,__PYX_ERR(1, 245, __pyx_L1_error))
22543 
22544 
22545  /* "View.MemoryView":287
22546  * return self.name
22547  *
22548  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
22549  * cdef strided = Enum("<strided and direct>") # default
22550  * cdef indirect = Enum("<strided and indirect>")
22551  */
22552  __Pyx_TraceLine(287,0,__PYX_ERR(1, 287, __pyx_L1_error))
22553  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error)
22554  __Pyx_GOTREF(__pyx_t_1);
22555  __Pyx_XGOTREF(generic);
22556  __Pyx_DECREF_SET(generic, __pyx_t_1);
22557  __Pyx_GIVEREF(__pyx_t_1);
22558  __pyx_t_1 = 0;
22559 
22560  /* "View.MemoryView":288
22561  *
22562  * cdef generic = Enum("<strided and direct or indirect>")
22563  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
22564  * cdef indirect = Enum("<strided and indirect>")
22565  *
22566  */
22567  __Pyx_TraceLine(288,0,__PYX_ERR(1, 288, __pyx_L1_error))
22568  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 288, __pyx_L1_error)
22569  __Pyx_GOTREF(__pyx_t_1);
22570  __Pyx_XGOTREF(strided);
22571  __Pyx_DECREF_SET(strided, __pyx_t_1);
22572  __Pyx_GIVEREF(__pyx_t_1);
22573  __pyx_t_1 = 0;
22574 
22575  /* "View.MemoryView":289
22576  * cdef generic = Enum("<strided and direct or indirect>")
22577  * cdef strided = Enum("<strided and direct>") # default
22578  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
22579  *
22580  *
22581  */
22582  __Pyx_TraceLine(289,0,__PYX_ERR(1, 289, __pyx_L1_error))
22583  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error)
22584  __Pyx_GOTREF(__pyx_t_1);
22585  __Pyx_XGOTREF(indirect);
22586  __Pyx_DECREF_SET(indirect, __pyx_t_1);
22587  __Pyx_GIVEREF(__pyx_t_1);
22588  __pyx_t_1 = 0;
22589 
22590  /* "View.MemoryView":292
22591  *
22592  *
22593  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
22594  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
22595  *
22596  */
22597  __Pyx_TraceLine(292,0,__PYX_ERR(1, 292, __pyx_L1_error))
22598  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 292, __pyx_L1_error)
22599  __Pyx_GOTREF(__pyx_t_1);
22600  __Pyx_XGOTREF(contiguous);
22601  __Pyx_DECREF_SET(contiguous, __pyx_t_1);
22602  __Pyx_GIVEREF(__pyx_t_1);
22603  __pyx_t_1 = 0;
22604 
22605  /* "View.MemoryView":293
22606  *
22607  * cdef contiguous = Enum("<contiguous and direct>")
22608  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
22609  *
22610  *
22611  */
22612  __Pyx_TraceLine(293,0,__PYX_ERR(1, 293, __pyx_L1_error))
22613  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 293, __pyx_L1_error)
22614  __Pyx_GOTREF(__pyx_t_1);
22615  __Pyx_XGOTREF(indirect_contiguous);
22616  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1);
22617  __Pyx_GIVEREF(__pyx_t_1);
22618  __pyx_t_1 = 0;
22619 
22620  /* "View.MemoryView":299
22621  *
22622  * @cname('__pyx_align_pointer')
22623  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
22624  * "Align pointer memory on a given boundary"
22625  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
22626  */
22627  __Pyx_TraceLine(299,0,__PYX_ERR(1, 299, __pyx_L1_error))
22628 
22629 
22630  /* "View.MemoryView":317
22631  *
22632  * DEF THREAD_LOCKS_PREALLOCATED = 8
22633  * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<<
22634  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
22635  * PyThread_allocate_lock(),
22636  */
22637  __Pyx_TraceLine(317,0,__PYX_ERR(1, 317, __pyx_L1_error))
22638  __pyx_memoryview_thread_locks_used = 0;
22639 
22640  /* "View.MemoryView":318
22641  * DEF THREAD_LOCKS_PREALLOCATED = 8
22642  * cdef int __pyx_memoryview_thread_locks_used = 0
22643  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<<
22644  * PyThread_allocate_lock(),
22645  * PyThread_allocate_lock(),
22646  */
22647  __Pyx_TraceLine(318,0,__PYX_ERR(1, 318, __pyx_L1_error))
22648  __pyx_t_2[0] = PyThread_allocate_lock();
22649  __pyx_t_2[1] = PyThread_allocate_lock();
22650  __pyx_t_2[2] = PyThread_allocate_lock();
22651  __pyx_t_2[3] = PyThread_allocate_lock();
22652  __pyx_t_2[4] = PyThread_allocate_lock();
22653  __pyx_t_2[5] = PyThread_allocate_lock();
22654  __pyx_t_2[6] = PyThread_allocate_lock();
22655  __pyx_t_2[7] = PyThread_allocate_lock();
22656  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_2, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
22657 
22658  /* "View.MemoryView":395
22659  * PyThread_free_lock(self.lock)
22660  *
22661  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
22662  * cdef Py_ssize_t dim
22663  * cdef char *itemp = <char *> self.view.buf
22664  */
22665  __Pyx_TraceLine(395,0,__PYX_ERR(1, 395, __pyx_L1_error))
22666 
22667 
22668  /* "View.MemoryView":433
22669  * self.setitem_indexed(index, value)
22670  *
22671  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
22672  * if not isinstance(obj, memoryview):
22673  * try:
22674  */
22675  __Pyx_TraceLine(433,0,__PYX_ERR(1, 433, __pyx_L1_error))
22676 
22677 
22678  /* "View.MemoryView":443
22679  * return obj
22680  *
22681  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
22682  * cdef __Pyx_memviewslice dst_slice
22683  * cdef __Pyx_memviewslice src_slice
22684  */
22685  __Pyx_TraceLine(443,0,__PYX_ERR(1, 443, __pyx_L1_error))
22686 
22687 
22688  /* "View.MemoryView":451
22689  * src.ndim, dst.ndim, self.dtype_is_object)
22690  *
22691  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
22692  * cdef int array[128]
22693  * cdef void *tmp = NULL
22694  */
22695  __Pyx_TraceLine(451,0,__PYX_ERR(1, 451, __pyx_L1_error))
22696 
22697 
22698  /* "View.MemoryView":483
22699  * PyMem_Free(tmp)
22700  *
22701  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
22702  * cdef char *itemp = self.get_item_pointer(index)
22703  * self.assign_item_from_object(itemp, value)
22704  */
22705  __Pyx_TraceLine(483,0,__PYX_ERR(1, 483, __pyx_L1_error))
22706 
22707 
22708  /* "View.MemoryView":487
22709  * self.assign_item_from_object(itemp, value)
22710  *
22711  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
22712  * """Only used if instantiated manually by the user, or if Cython doesn't
22713  * know how to convert the type"""
22714  */
22715  __Pyx_TraceLine(487,0,__PYX_ERR(1, 487, __pyx_L1_error))
22716 
22717 
22718  /* "View.MemoryView":503
22719  * return result
22720  *
22721  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
22722  * """Only used if instantiated manually by the user, or if Cython doesn't
22723  * know how to convert the type"""
22724  */
22725  __Pyx_TraceLine(503,0,__PYX_ERR(1, 503, __pyx_L1_error))
22726 
22727 
22728  /* "View.MemoryView":551
22729  * info.obj = self
22730  *
22731  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
22732  *
22733  *
22734  */
22735  __Pyx_TraceLine(551,0,__PYX_ERR(1, 551, __pyx_L1_error))
22736  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 551, __pyx_L1_error)
22737  __Pyx_GOTREF(__pyx_t_1);
22738  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 551, __pyx_L1_error)
22739  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22740  PyType_Modified(__pyx_memoryview_type);
22741 
22742  /* "View.MemoryView":659
22743  *
22744  * @cname('__pyx_memoryview_new')
22745  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
22746  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
22747  * result.typeinfo = typeinfo
22748  */
22749  __Pyx_TraceLine(659,0,__PYX_ERR(1, 659, __pyx_L1_error))
22750 
22751 
22752  /* "View.MemoryView":665
22753  *
22754  * @cname('__pyx_memoryview_check')
22755  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
22756  * return isinstance(o, memoryview)
22757  *
22758  */
22759  __Pyx_TraceLine(665,0,__PYX_ERR(1, 665, __pyx_L1_error))
22760 
22761 
22762  /* "View.MemoryView":668
22763  * return isinstance(o, memoryview)
22764  *
22765  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
22766  * """
22767  * Replace all ellipses with full slices and fill incomplete indices with
22768  */
22769  __Pyx_TraceLine(668,0,__PYX_ERR(1, 668, __pyx_L1_error))
22770 
22771 
22772  /* "View.MemoryView":702
22773  * return have_slices or nslices, tuple(result)
22774  *
22775  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
22776  * for suboffset in suboffsets[:ndim]:
22777  * if suboffset >= 0:
22778  */
22779  __Pyx_TraceLine(702,0,__PYX_ERR(1, 702, __pyx_L1_error))
22780 
22781 
22782  /* "View.MemoryView":712
22783  *
22784  * @cname('__pyx_memview_slice')
22785  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
22786  * cdef int new_ndim = 0, suboffset_dim = -1, dim
22787  * cdef bint negative_step
22788  */
22789  __Pyx_TraceLine(712,0,__PYX_ERR(1, 712, __pyx_L1_error))
22790 
22791 
22792  /* "View.MemoryView":809
22793  *
22794  * @cname('__pyx_memoryview_slice_memviewslice')
22795  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
22796  * __Pyx_memviewslice *dst,
22797  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
22798  */
22799  __Pyx_TraceLine(809,0,__PYX_ERR(1, 809, __pyx_L1_error))
22800 
22801 
22802  /* "View.MemoryView":912
22803  *
22804  * @cname('__pyx_pybuffer_index')
22805  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
22806  * Py_ssize_t dim) except NULL:
22807  * cdef Py_ssize_t shape, stride, suboffset = -1
22808  */
22809  __Pyx_TraceLine(912,0,__PYX_ERR(1, 912, __pyx_L1_error))
22810 
22811 
22812  /* "View.MemoryView":945
22813  *
22814  * @cname('__pyx_memslice_transpose')
22815  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
22816  * cdef int ndim = memslice.memview.view.ndim
22817  *
22818  */
22819  __Pyx_TraceLine(945,0,__PYX_ERR(1, 945, __pyx_L1_error))
22820 
22821 
22822  /* "View.MemoryView":981
22823  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
22824  *
22825  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
22826  * if self.to_object_func != NULL:
22827  * return self.to_object_func(itemp)
22828  */
22829  __Pyx_TraceLine(981,0,__PYX_ERR(1, 981, __pyx_L1_error))
22830 
22831 
22832  /* "View.MemoryView":987
22833  * return memoryview.convert_item_to_object(self, itemp)
22834  *
22835  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
22836  * if self.to_dtype_func != NULL:
22837  * self.to_dtype_func(itemp, value)
22838  */
22839  __Pyx_TraceLine(987,0,__PYX_ERR(1, 987, __pyx_L1_error))
22840 
22841 
22842  /* "View.MemoryView":997
22843  * return self.from_object
22844  *
22845  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
22846  *
22847  *
22848  */
22849  __Pyx_TraceLine(997,0,__PYX_ERR(1, 997, __pyx_L1_error))
22850  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 997, __pyx_L1_error)
22851  __Pyx_GOTREF(__pyx_t_1);
22852  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(1, 997, __pyx_L1_error)
22853  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22854  PyType_Modified(__pyx_memoryviewslice_type);
22855 
22856  /* "View.MemoryView":1001
22857  *
22858  * @cname('__pyx_memoryview_fromslice')
22859  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
22860  * int ndim,
22861  * object (*to_object_func)(char *),
22862  */
22863  __Pyx_TraceLine(1001,0,__PYX_ERR(1, 1001, __pyx_L1_error))
22864 
22865 
22866  /* "View.MemoryView":1054
22867  *
22868  * @cname('__pyx_memoryview_get_slice_from_memoryview')
22869  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
22870  * __Pyx_memviewslice *mslice) except NULL:
22871  * cdef _memoryviewslice obj
22872  */
22873  __Pyx_TraceLine(1054,0,__PYX_ERR(1, 1054, __pyx_L1_error))
22874 
22875 
22876  /* "View.MemoryView":1065
22877  *
22878  * @cname('__pyx_memoryview_slice_copy')
22879  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
22880  * cdef int dim
22881  * cdef (Py_ssize_t*) shape, strides, suboffsets
22882  */
22883  __Pyx_TraceLine(1065,0,__PYX_ERR(1, 1065, __pyx_L1_error))
22884 
22885 
22886  /* "View.MemoryView":1082
22887  *
22888  * @cname('__pyx_memoryview_copy_object')
22889  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
22890  * "Create a new memoryview object"
22891  * cdef __Pyx_memviewslice memviewslice
22892  */
22893  __Pyx_TraceLine(1082,0,__PYX_ERR(1, 1082, __pyx_L1_error))
22894 
22895 
22896  /* "View.MemoryView":1089
22897  *
22898  * @cname('__pyx_memoryview_copy_object_from_slice')
22899  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
22900  * """
22901  * Create a new memoryview object from a given memoryview object and slice.
22902  */
22903  __Pyx_TraceLine(1089,0,__PYX_ERR(1, 1089, __pyx_L1_error))
22904 
22905 
22906  /* "View.MemoryView":1111
22907  *
22908  *
22909  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
22910  * if arg < 0:
22911  * return -arg
22912  */
22913  __Pyx_TraceLine(1111,0,__PYX_ERR(1, 1111, __pyx_L1_error))
22914 
22915 
22916  /* "View.MemoryView":1118
22917  *
22918  * @cname('__pyx_get_best_slice_order')
22919  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
22920  * """
22921  * Figure out the best memory access order for a given slice.
22922  */
22923  __Pyx_TraceLine(1118,0,__PYX_ERR(1, 1118, __pyx_L1_error))
22924 
22925 
22926  /* "View.MemoryView":1172
22927  * dst_data += dst_stride
22928  *
22929  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
22930  * __Pyx_memviewslice *dst,
22931  * int ndim, size_t itemsize) nogil:
22932  */
22933  __Pyx_TraceLine(1172,0,__PYX_ERR(1, 1172, __pyx_L1_error))
22934 
22935 
22936  /* "View.MemoryView":1179
22937  *
22938  * @cname('__pyx_memoryview_slice_get_size')
22939  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
22940  * "Return the size of the memory occupied by the slice in number of bytes"
22941  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
22942  */
22943  __Pyx_TraceLine(1179,0,__PYX_ERR(1, 1179, __pyx_L1_error))
22944 
22945 
22946  /* "View.MemoryView":1189
22947  *
22948  * @cname('__pyx_fill_contig_strides_array')
22949  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
22950  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
22951  * int ndim, char order) nogil:
22952  */
22953  __Pyx_TraceLine(1189,0,__PYX_ERR(1, 1189, __pyx_L1_error))
22954 
22955 
22956  /* "View.MemoryView":1210
22957  *
22958  * @cname('__pyx_memoryview_copy_data_to_temp')
22959  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
22960  * __Pyx_memviewslice *tmpslice,
22961  * char order,
22962  */
22963  __Pyx_TraceLine(1210,0,__PYX_ERR(1, 1210, __pyx_L1_error))
22964 
22965 
22966  /* "View.MemoryView":1253
22967  *
22968  * @cname('__pyx_memoryview_err_extents')
22969  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
22970  * Py_ssize_t extent2) except -1 with gil:
22971  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
22972  */
22973  __Pyx_TraceLine(1253,0,__PYX_ERR(1, 1253, __pyx_L1_error))
22974 
22975 
22976  /* "View.MemoryView":1259
22977  *
22978  * @cname('__pyx_memoryview_err_dim')
22979  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
22980  * raise error(msg.decode('ascii') % dim)
22981  *
22982  */
22983  __Pyx_TraceLine(1259,0,__PYX_ERR(1, 1259, __pyx_L1_error))
22984 
22985 
22986  /* "View.MemoryView":1263
22987  *
22988  * @cname('__pyx_memoryview_err')
22989  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
22990  * if msg != NULL:
22991  * raise error(msg.decode('ascii'))
22992  */
22993  __Pyx_TraceLine(1263,0,__PYX_ERR(1, 1263, __pyx_L1_error))
22994 
22995 
22996  /* "View.MemoryView":1270
22997  *
22998  * @cname('__pyx_memoryview_copy_contents')
22999  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
23000  * __Pyx_memviewslice dst,
23001  * int src_ndim, int dst_ndim,
23002  */
23003  __Pyx_TraceLine(1270,0,__PYX_ERR(1, 1270, __pyx_L1_error))
23004 
23005 
23006  /* "View.MemoryView":1342
23007  *
23008  * @cname('__pyx_memoryview_broadcast_leading')
23009  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
23010  * int ndim,
23011  * int ndim_other) nogil:
23012  */
23013  __Pyx_TraceLine(1342,0,__PYX_ERR(1, 1342, __pyx_L1_error))
23014 
23015 
23016  /* "View.MemoryView":1364
23017  *
23018  * @cname('__pyx_memoryview_refcount_copying')
23019  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
23020  * int ndim, bint inc) nogil:
23021  *
23022  */
23023  __Pyx_TraceLine(1364,0,__PYX_ERR(1, 1364, __pyx_L1_error))
23024 
23025 
23026  /* "View.MemoryView":1373
23027  *
23028  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
23029  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
23030  * Py_ssize_t *strides, int ndim,
23031  * bint inc) with gil:
23032  */
23033  __Pyx_TraceLine(1373,0,__PYX_ERR(1, 1373, __pyx_L1_error))
23034 
23035 
23036  /* "View.MemoryView":1379
23037  *
23038  * @cname('__pyx_memoryview_refcount_objects_in_slice')
23039  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
23040  * Py_ssize_t *strides, int ndim, bint inc):
23041  * cdef Py_ssize_t i
23042  */
23043  __Pyx_TraceLine(1379,0,__PYX_ERR(1, 1379, __pyx_L1_error))
23044 
23045 
23046  /* "View.MemoryView":1399
23047  *
23048  * @cname('__pyx_memoryview_slice_assign_scalar')
23049  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
23050  * size_t itemsize, void *item,
23051  * bint dtype_is_object) nogil:
23052  */
23053  __Pyx_TraceLine(1399,0,__PYX_ERR(1, 1399, __pyx_L1_error))
23054 
23055 
23056  /* "View.MemoryView":1409
23057  *
23058  * @cname('__pyx_memoryview__slice_assign_scalar')
23059  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
23060  * Py_ssize_t *strides, int ndim,
23061  * size_t itemsize, void *item) nogil:
23062  */
23063  __Pyx_TraceLine(1409,0,__PYX_ERR(1, 1409, __pyx_L1_error))
23064 
23065 
23066  /* "(tree fragment)":1
23067  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
23068  * cdef object __pyx_PickleError
23069  * cdef object __pyx_result
23070  */
23071  __Pyx_TraceLine(1,0,__PYX_ERR(1, 1, __pyx_L1_error))
23072  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
23073  __Pyx_GOTREF(__pyx_t_1);
23074  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
23075  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23076 
23077  /* "(tree fragment)":11
23078  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
23079  * return __pyx_result
23080  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
23081  * __pyx_result.name = __pyx_state[0]
23082  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
23083  */
23084  __Pyx_TraceLine(11,0,__PYX_ERR(1, 11, __pyx_L1_error))
23085 
23086  __Pyx_TraceReturn(Py_None, 0);
23087 
23088  /*--- Wrapped vars code ---*/
23089 
23090  goto __pyx_L0;
23091  __pyx_L1_error:;
23092  __Pyx_XDECREF(__pyx_t_1);
23093  if (__pyx_m) {
23094  if (__pyx_d) {
23095  __Pyx_AddTraceback("init imate._c_linear_operator.py_c_linear_operator", __pyx_clineno, __pyx_lineno, __pyx_filename);
23096  }
23097  Py_CLEAR(__pyx_m);
23098  } else if (!PyErr_Occurred()) {
23099  PyErr_SetString(PyExc_ImportError, "init imate._c_linear_operator.py_c_linear_operator");
23100  }
23101  __pyx_L0:;
23102  __Pyx_RefNannyFinishContext();
23103  #if CYTHON_PEP489_MULTI_PHASE_INIT
23104  return (__pyx_m != NULL) ? 0 : -1;
23105  #elif PY_MAJOR_VERSION >= 3
23106  return __pyx_m;
23107  #else
23108  return;
23109  #endif
23110 }
23111 
23112 /* --- Runtime support code --- */
23113 /* Refnanny */
23114 #if CYTHON_REFNANNY
23115 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
23116  PyObject *m = NULL, *p = NULL;
23117  void *r = NULL;
23118  m = PyImport_ImportModule(modname);
23119  if (!m) goto end;
23120  p = PyObject_GetAttrString(m, "RefNannyAPI");
23121  if (!p) goto end;
23122  r = PyLong_AsVoidPtr(p);
23123 end:
23124  Py_XDECREF(p);
23125  Py_XDECREF(m);
23126  return (__Pyx_RefNannyAPIStruct *)r;
23127 }
23128 #endif
23129 
23130 /* PyObjectGetAttrStr */
23131 #if CYTHON_USE_TYPE_SLOTS
23132 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
23133  PyTypeObject* tp = Py_TYPE(obj);
23134  if (likely(tp->tp_getattro))
23135  return tp->tp_getattro(obj, attr_name);
23136 #if PY_MAJOR_VERSION < 3
23137  if (likely(tp->tp_getattr))
23138  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
23139 #endif
23140  return PyObject_GetAttr(obj, attr_name);
23141 }
23142 #endif
23143 
23144 /* GetBuiltinName */
23145 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
23146  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
23147  if (unlikely(!result)) {
23148  PyErr_Format(PyExc_NameError,
23149 #if PY_MAJOR_VERSION >= 3
23150  "name '%U' is not defined", name);
23151 #else
23152  "name '%.200s' is not defined", PyString_AS_STRING(name));
23153 #endif
23154  }
23155  return result;
23156 }
23157 
23158 /* RaiseArgTupleInvalid */
23159 static void __Pyx_RaiseArgtupleInvalid(
23160  const char* func_name,
23161  int exact,
23162  Py_ssize_t num_min,
23163  Py_ssize_t num_max,
23164  Py_ssize_t num_found)
23165 {
23166  Py_ssize_t num_expected;
23167  const char *more_or_less;
23168  if (num_found < num_min) {
23169  num_expected = num_min;
23170  more_or_less = "at least";
23171  } else {
23172  num_expected = num_max;
23173  more_or_less = "at most";
23174  }
23175  if (exact) {
23176  more_or_less = "exactly";
23177  }
23178  PyErr_Format(PyExc_TypeError,
23179  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
23180  func_name, more_or_less, num_expected,
23181  (num_expected == 1) ? "" : "s", num_found);
23182 }
23183 
23184 /* KeywordStringCheck */
23185 static int __Pyx_CheckKeywordStrings(
23186  PyObject *kwdict,
23187  const char* function_name,
23188  int kw_allowed)
23189 {
23190  PyObject* key = 0;
23191  Py_ssize_t pos = 0;
23192 #if CYTHON_COMPILING_IN_PYPY
23193  if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
23194  goto invalid_keyword;
23195  return 1;
23196 #else
23197  while (PyDict_Next(kwdict, &pos, &key, 0)) {
23198  #if PY_MAJOR_VERSION < 3
23199  if (unlikely(!PyString_Check(key)))
23200  #endif
23201  if (unlikely(!PyUnicode_Check(key)))
23202  goto invalid_keyword_type;
23203  }
23204  if ((!kw_allowed) && unlikely(key))
23205  goto invalid_keyword;
23206  return 1;
23207 invalid_keyword_type:
23208  PyErr_Format(PyExc_TypeError,
23209  "%.200s() keywords must be strings", function_name);
23210  return 0;
23211 #endif
23212 invalid_keyword:
23213  PyErr_Format(PyExc_TypeError,
23214  #if PY_MAJOR_VERSION < 3
23215  "%.200s() got an unexpected keyword argument '%.200s'",
23216  function_name, PyString_AsString(key));
23217  #else
23218  "%s() got an unexpected keyword argument '%U'",
23219  function_name, key);
23220  #endif
23221  return 0;
23222 }
23223 
23224 /* PyErrFetchRestore */
23225 #if CYTHON_FAST_THREAD_STATE
23226 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
23227  PyObject *tmp_type, *tmp_value, *tmp_tb;
23228  tmp_type = tstate->curexc_type;
23229  tmp_value = tstate->curexc_value;
23230  tmp_tb = tstate->curexc_traceback;
23231  tstate->curexc_type = type;
23232  tstate->curexc_value = value;
23233  tstate->curexc_traceback = tb;
23234  Py_XDECREF(tmp_type);
23235  Py_XDECREF(tmp_value);
23236  Py_XDECREF(tmp_tb);
23237 }
23238 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
23239  *type = tstate->curexc_type;
23240  *value = tstate->curexc_value;
23241  *tb = tstate->curexc_traceback;
23242  tstate->curexc_type = 0;
23243  tstate->curexc_value = 0;
23244  tstate->curexc_traceback = 0;
23245 }
23246 #endif
23247 
23248 /* Profile */
23249 #if CYTHON_PROFILE
23250 static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
23251  PyFrameObject** frame,
23252  PyThreadState* tstate,
23253  const char *funcname,
23254  const char *srcfile,
23255  int firstlineno) {
23256  PyObject *type, *value, *traceback;
23257  int retval;
23258  if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
23259  if (*code == NULL) {
23260  *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
23261  if (*code == NULL) return 0;
23262  }
23263  *frame = PyFrame_New(
23264  tstate, /*PyThreadState *tstate*/
23265  *code, /*PyCodeObject *code*/
23266  __pyx_d, /*PyObject *globals*/
23267  0 /*PyObject *locals*/
23268  );
23269  if (*frame == NULL) return 0;
23270  if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
23271  Py_INCREF(Py_None);
23272  (*frame)->f_trace = Py_None;
23273  }
23274 #if PY_VERSION_HEX < 0x030400B1
23275  } else {
23276  (*frame)->f_tstate = tstate;
23277 #endif
23278  }
23279  __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
23280  retval = 1;
23281  __Pyx_EnterTracing(tstate);
23282  __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
23283  #if CYTHON_TRACE
23284  if (tstate->c_tracefunc)
23285  retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
23286  if (retval && tstate->c_profilefunc)
23287  #endif
23288  retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
23289  __Pyx_LeaveTracing(tstate);
23290  if (retval) {
23291  __Pyx_ErrRestoreInState(tstate, type, value, traceback);
23292  return __Pyx_IsTracing(tstate, 0, 0) && retval;
23293  } else {
23294  Py_XDECREF(type);
23295  Py_XDECREF(value);
23296  Py_XDECREF(traceback);
23297  return -1;
23298  }
23299 }
23300 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
23301  PyCodeObject *py_code = 0;
23302 #if PY_MAJOR_VERSION >= 3
23303  py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
23304  if (likely(py_code)) {
23305  py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
23306  }
23307 #else
23308  PyObject *py_srcfile = 0;
23309  PyObject *py_funcname = 0;
23310  py_funcname = PyString_FromString(funcname);
23311  if (unlikely(!py_funcname)) goto bad;
23312  py_srcfile = PyString_FromString(srcfile);
23313  if (unlikely(!py_srcfile)) goto bad;
23314  py_code = PyCode_New(
23315  0,
23316  0,
23317  0,
23318  CO_OPTIMIZED | CO_NEWLOCALS,
23319  __pyx_empty_bytes, /*PyObject *code,*/
23320  __pyx_empty_tuple, /*PyObject *consts,*/
23321  __pyx_empty_tuple, /*PyObject *names,*/
23322  __pyx_empty_tuple, /*PyObject *varnames,*/
23323  __pyx_empty_tuple, /*PyObject *freevars,*/
23324  __pyx_empty_tuple, /*PyObject *cellvars,*/
23325  py_srcfile, /*PyObject *filename,*/
23326  py_funcname, /*PyObject *name,*/
23327  firstlineno,
23328  __pyx_empty_bytes /*PyObject *lnotab*/
23329  );
23330 bad:
23331  Py_XDECREF(py_srcfile);
23332  Py_XDECREF(py_funcname);
23333 #endif
23334  return py_code;
23335 }
23336 #endif
23337 
23338 /* PyObjectCall */
23339 #if CYTHON_COMPILING_IN_CPYTHON
23340 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
23341  PyObject *result;
23342  ternaryfunc call = Py_TYPE(func)->tp_call;
23343  if (unlikely(!call))
23344  return PyObject_Call(func, arg, kw);
23345  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
23346  return NULL;
23347  result = (*call)(func, arg, kw);
23348  Py_LeaveRecursiveCall();
23349  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
23350  PyErr_SetString(
23351  PyExc_SystemError,
23352  "NULL result without error in PyObject_Call");
23353  }
23354  return result;
23355 }
23356 #endif
23357 
23358 /* RaiseException */
23359 #if PY_MAJOR_VERSION < 3
23360 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
23361  CYTHON_UNUSED PyObject *cause) {
23362  __Pyx_PyThreadState_declare
23363  Py_XINCREF(type);
23364  if (!value || value == Py_None)
23365  value = NULL;
23366  else
23367  Py_INCREF(value);
23368  if (!tb || tb == Py_None)
23369  tb = NULL;
23370  else {
23371  Py_INCREF(tb);
23372  if (!PyTraceBack_Check(tb)) {
23373  PyErr_SetString(PyExc_TypeError,
23374  "raise: arg 3 must be a traceback or None");
23375  goto raise_error;
23376  }
23377  }
23378  if (PyType_Check(type)) {
23379 #if CYTHON_COMPILING_IN_PYPY
23380  if (!value) {
23381  Py_INCREF(Py_None);
23382  value = Py_None;
23383  }
23384 #endif
23385  PyErr_NormalizeException(&type, &value, &tb);
23386  } else {
23387  if (value) {
23388  PyErr_SetString(PyExc_TypeError,
23389  "instance exception may not have a separate value");
23390  goto raise_error;
23391  }
23392  value = type;
23393  type = (PyObject*) Py_TYPE(type);
23394  Py_INCREF(type);
23395  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
23396  PyErr_SetString(PyExc_TypeError,
23397  "raise: exception class must be a subclass of BaseException");
23398  goto raise_error;
23399  }
23400  }
23401  __Pyx_PyThreadState_assign
23402  __Pyx_ErrRestore(type, value, tb);
23403  return;
23404 raise_error:
23405  Py_XDECREF(value);
23406  Py_XDECREF(type);
23407  Py_XDECREF(tb);
23408  return;
23409 }
23410 #else
23411 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
23412  PyObject* owned_instance = NULL;
23413  if (tb == Py_None) {
23414  tb = 0;
23415  } else if (tb && !PyTraceBack_Check(tb)) {
23416  PyErr_SetString(PyExc_TypeError,
23417  "raise: arg 3 must be a traceback or None");
23418  goto bad;
23419  }
23420  if (value == Py_None)
23421  value = 0;
23422  if (PyExceptionInstance_Check(type)) {
23423  if (value) {
23424  PyErr_SetString(PyExc_TypeError,
23425  "instance exception may not have a separate value");
23426  goto bad;
23427  }
23428  value = type;
23429  type = (PyObject*) Py_TYPE(value);
23430  } else if (PyExceptionClass_Check(type)) {
23431  PyObject *instance_class = NULL;
23432  if (value && PyExceptionInstance_Check(value)) {
23433  instance_class = (PyObject*) Py_TYPE(value);
23434  if (instance_class != type) {
23435  int is_subclass = PyObject_IsSubclass(instance_class, type);
23436  if (!is_subclass) {
23437  instance_class = NULL;
23438  } else if (unlikely(is_subclass == -1)) {
23439  goto bad;
23440  } else {
23441  type = instance_class;
23442  }
23443  }
23444  }
23445  if (!instance_class) {
23446  PyObject *args;
23447  if (!value)
23448  args = PyTuple_New(0);
23449  else if (PyTuple_Check(value)) {
23450  Py_INCREF(value);
23451  args = value;
23452  } else
23453  args = PyTuple_Pack(1, value);
23454  if (!args)
23455  goto bad;
23456  owned_instance = PyObject_Call(type, args, NULL);
23457  Py_DECREF(args);
23458  if (!owned_instance)
23459  goto bad;
23460  value = owned_instance;
23461  if (!PyExceptionInstance_Check(value)) {
23462  PyErr_Format(PyExc_TypeError,
23463  "calling %R should have returned an instance of "
23464  "BaseException, not %R",
23465  type, Py_TYPE(value));
23466  goto bad;
23467  }
23468  }
23469  } else {
23470  PyErr_SetString(PyExc_TypeError,
23471  "raise: exception class must be a subclass of BaseException");
23472  goto bad;
23473  }
23474  if (cause) {
23475  PyObject *fixed_cause;
23476  if (cause == Py_None) {
23477  fixed_cause = NULL;
23478  } else if (PyExceptionClass_Check(cause)) {
23479  fixed_cause = PyObject_CallObject(cause, NULL);
23480  if (fixed_cause == NULL)
23481  goto bad;
23482  } else if (PyExceptionInstance_Check(cause)) {
23483  fixed_cause = cause;
23484  Py_INCREF(fixed_cause);
23485  } else {
23486  PyErr_SetString(PyExc_TypeError,
23487  "exception causes must derive from "
23488  "BaseException");
23489  goto bad;
23490  }
23491  PyException_SetCause(value, fixed_cause);
23492  }
23493  PyErr_SetObject(type, value);
23494  if (tb) {
23495 #if CYTHON_FAST_THREAD_STATE
23496  PyThreadState *tstate = __Pyx_PyThreadState_Current;
23497  PyObject* tmp_tb = tstate->curexc_traceback;
23498  if (tb != tmp_tb) {
23499  Py_INCREF(tb);
23500  tstate->curexc_traceback = tb;
23501  Py_XDECREF(tmp_tb);
23502  }
23503 #else
23504  PyObject *tmp_type, *tmp_value, *tmp_tb;
23505  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
23506  Py_INCREF(tb);
23507  PyErr_Restore(tmp_type, tmp_value, tb);
23508  Py_XDECREF(tmp_tb);
23509 #endif
23510  }
23511 bad:
23512  Py_XDECREF(owned_instance);
23513  return;
23514 }
23515 #endif
23516 
23517 /* WriteUnraisableException */
23518 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
23519  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
23520  int full_traceback, CYTHON_UNUSED int nogil) {
23521  PyObject *old_exc, *old_val, *old_tb;
23522  PyObject *ctx;
23523  __Pyx_PyThreadState_declare
23524 #ifdef WITH_THREAD
23525  PyGILState_STATE state;
23526  if (nogil)
23527  state = PyGILState_Ensure();
23528  else state = (PyGILState_STATE)0;
23529 #endif
23530  __Pyx_PyThreadState_assign
23531  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
23532  if (full_traceback) {
23533  Py_XINCREF(old_exc);
23534  Py_XINCREF(old_val);
23535  Py_XINCREF(old_tb);
23536  __Pyx_ErrRestore(old_exc, old_val, old_tb);
23537  PyErr_PrintEx(1);
23538  }
23539  #if PY_MAJOR_VERSION < 3
23540  ctx = PyString_FromString(name);
23541  #else
23542  ctx = PyUnicode_FromString(name);
23543  #endif
23544  __Pyx_ErrRestore(old_exc, old_val, old_tb);
23545  if (!ctx) {
23546  PyErr_WriteUnraisable(Py_None);
23547  } else {
23548  PyErr_WriteUnraisable(ctx);
23549  Py_DECREF(ctx);
23550  }
23551 #ifdef WITH_THREAD
23552  if (nogil)
23553  PyGILState_Release(state);
23554 #endif
23555 }
23556 
23557 /* BytesEquals */
23558 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
23559 #if CYTHON_COMPILING_IN_PYPY
23560  return PyObject_RichCompareBool(s1, s2, equals);
23561 #else
23562  if (s1 == s2) {
23563  return (equals == Py_EQ);
23564  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
23565  const char *ps1, *ps2;
23566  Py_ssize_t length = PyBytes_GET_SIZE(s1);
23567  if (length != PyBytes_GET_SIZE(s2))
23568  return (equals == Py_NE);
23569  ps1 = PyBytes_AS_STRING(s1);
23570  ps2 = PyBytes_AS_STRING(s2);
23571  if (ps1[0] != ps2[0]) {
23572  return (equals == Py_NE);
23573  } else if (length == 1) {
23574  return (equals == Py_EQ);
23575  } else {
23576  int result;
23577 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
23578  Py_hash_t hash1, hash2;
23579  hash1 = ((PyBytesObject*)s1)->ob_shash;
23580  hash2 = ((PyBytesObject*)s2)->ob_shash;
23581  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
23582  return (equals == Py_NE);
23583  }
23584 #endif
23585  result = memcmp(ps1, ps2, (size_t)length);
23586  return (equals == Py_EQ) ? (result == 0) : (result != 0);
23587  }
23588  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
23589  return (equals == Py_NE);
23590  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
23591  return (equals == Py_NE);
23592  } else {
23593  int result;
23594  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
23595  if (!py_result)
23596  return -1;
23597  result = __Pyx_PyObject_IsTrue(py_result);
23598  Py_DECREF(py_result);
23599  return result;
23600  }
23601 #endif
23602 }
23603 
23604 /* PyCFunctionFastCall */
23605 #if CYTHON_FAST_PYCCALL
23606 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
23607  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
23608  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
23609  PyObject *self = PyCFunction_GET_SELF(func);
23610  int flags = PyCFunction_GET_FLAGS(func);
23611  assert(PyCFunction_Check(func));
23612  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
23613  assert(nargs >= 0);
23614  assert(nargs == 0 || args != NULL);
23615  /* _PyCFunction_FastCallDict() must not be called with an exception set,
23616  because it may clear it (directly or indirectly) and so the
23617  caller loses its exception */
23618  assert(!PyErr_Occurred());
23619  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
23620  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
23621  } else {
23622  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
23623  }
23624 }
23625 #endif
23626 
23627 /* PyFunctionFastCall */
23628 #if CYTHON_FAST_PYCALL
23629 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
23630  PyObject *globals) {
23631  PyFrameObject *f;
23632  PyThreadState *tstate = __Pyx_PyThreadState_Current;
23633  PyObject **fastlocals;
23634  Py_ssize_t i;
23635  PyObject *result;
23636  assert(globals != NULL);
23637  /* XXX Perhaps we should create a specialized
23638  PyFrame_New() that doesn't take locals, but does
23639  take builtins without sanity checking them.
23640  */
23641  assert(tstate != NULL);
23642  f = PyFrame_New(tstate, co, globals, NULL);
23643  if (f == NULL) {
23644  return NULL;
23645  }
23646  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
23647  for (i = 0; i < na; i++) {
23648  Py_INCREF(*args);
23649  fastlocals[i] = *args++;
23650  }
23651  result = PyEval_EvalFrameEx(f,0);
23652  ++tstate->recursion_depth;
23653  Py_DECREF(f);
23654  --tstate->recursion_depth;
23655  return result;
23656 }
23657 #if 1 || PY_VERSION_HEX < 0x030600B1
23658 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
23659  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
23660  PyObject *globals = PyFunction_GET_GLOBALS(func);
23661  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
23662  PyObject *closure;
23663 #if PY_MAJOR_VERSION >= 3
23664  PyObject *kwdefs;
23665 #endif
23666  PyObject *kwtuple, **k;
23667  PyObject **d;
23668  Py_ssize_t nd;
23669  Py_ssize_t nk;
23670  PyObject *result;
23671  assert(kwargs == NULL || PyDict_Check(kwargs));
23672  nk = kwargs ? PyDict_Size(kwargs) : 0;
23673  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
23674  return NULL;
23675  }
23676  if (
23677 #if PY_MAJOR_VERSION >= 3
23678  co->co_kwonlyargcount == 0 &&
23679 #endif
23680  likely(kwargs == NULL || nk == 0) &&
23681  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
23682  if (argdefs == NULL && co->co_argcount == nargs) {
23683  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
23684  goto done;
23685  }
23686  else if (nargs == 0 && argdefs != NULL
23687  && co->co_argcount == Py_SIZE(argdefs)) {
23688  /* function called with no arguments, but all parameters have
23689  a default value: use default values as arguments .*/
23690  args = &PyTuple_GET_ITEM(argdefs, 0);
23691  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
23692  goto done;
23693  }
23694  }
23695  if (kwargs != NULL) {
23696  Py_ssize_t pos, i;
23697  kwtuple = PyTuple_New(2 * nk);
23698  if (kwtuple == NULL) {
23699  result = NULL;
23700  goto done;
23701  }
23702  k = &PyTuple_GET_ITEM(kwtuple, 0);
23703  pos = i = 0;
23704  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
23705  Py_INCREF(k[i]);
23706  Py_INCREF(k[i+1]);
23707  i += 2;
23708  }
23709  nk = i / 2;
23710  }
23711  else {
23712  kwtuple = NULL;
23713  k = NULL;
23714  }
23715  closure = PyFunction_GET_CLOSURE(func);
23716 #if PY_MAJOR_VERSION >= 3
23717  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
23718 #endif
23719  if (argdefs != NULL) {
23720  d = &PyTuple_GET_ITEM(argdefs, 0);
23721  nd = Py_SIZE(argdefs);
23722  }
23723  else {
23724  d = NULL;
23725  nd = 0;
23726  }
23727 #if PY_MAJOR_VERSION >= 3
23728  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
23729  args, (int)nargs,
23730  k, (int)nk,
23731  d, (int)nd, kwdefs, closure);
23732 #else
23733  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
23734  args, (int)nargs,
23735  k, (int)nk,
23736  d, (int)nd, closure);
23737 #endif
23738  Py_XDECREF(kwtuple);
23739 done:
23740  Py_LeaveRecursiveCall();
23741  return result;
23742 }
23743 #endif
23744 #endif
23745 
23746 /* PyObjectCallMethO */
23747 #if CYTHON_COMPILING_IN_CPYTHON
23748 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
23749  PyObject *self, *result;
23750  PyCFunction cfunc;
23751  cfunc = PyCFunction_GET_FUNCTION(func);
23752  self = PyCFunction_GET_SELF(func);
23753  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
23754  return NULL;
23755  result = cfunc(self, arg);
23756  Py_LeaveRecursiveCall();
23757  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
23758  PyErr_SetString(
23759  PyExc_SystemError,
23760  "NULL result without error in PyObject_Call");
23761  }
23762  return result;
23763 }
23764 #endif
23765 
23766 /* PyObjectCallOneArg */
23767 #if CYTHON_COMPILING_IN_CPYTHON
23768 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
23769  PyObject *result;
23770  PyObject *args = PyTuple_New(1);
23771  if (unlikely(!args)) return NULL;
23772  Py_INCREF(arg);
23773  PyTuple_SET_ITEM(args, 0, arg);
23774  result = __Pyx_PyObject_Call(func, args, NULL);
23775  Py_DECREF(args);
23776  return result;
23777 }
23778 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
23779 #if CYTHON_FAST_PYCALL
23780  if (PyFunction_Check(func)) {
23781  return __Pyx_PyFunction_FastCall(func, &arg, 1);
23782  }
23783 #endif
23784  if (likely(PyCFunction_Check(func))) {
23785  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
23786  return __Pyx_PyObject_CallMethO(func, arg);
23787 #if CYTHON_FAST_PYCCALL
23788  } else if (__Pyx_PyFastCFunction_Check(func)) {
23789  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
23790 #endif
23791  }
23792  }
23793  return __Pyx__PyObject_CallOneArg(func, arg);
23794 }
23795 #else
23796 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
23797  PyObject *result;
23798  PyObject *args = PyTuple_Pack(1, arg);
23799  if (unlikely(!args)) return NULL;
23800  result = __Pyx_PyObject_Call(func, args, NULL);
23801  Py_DECREF(args);
23802  return result;
23803 }
23804 #endif
23805 
23806 /* PyDictVersioning */
23807 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
23808 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
23809  PyObject *dict = Py_TYPE(obj)->tp_dict;
23810  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
23811 }
23812 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
23813  PyObject **dictptr = NULL;
23814  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
23815  if (offset) {
23816 #if CYTHON_COMPILING_IN_CPYTHON
23817  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
23818 #else
23819  dictptr = _PyObject_GetDictPtr(obj);
23820 #endif
23821  }
23822  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
23823 }
23824 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
23825  PyObject *dict = Py_TYPE(obj)->tp_dict;
23826  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
23827  return 0;
23828  return obj_dict_version == __Pyx_get_object_dict_version(obj);
23829 }
23830 #endif
23831 
23832 /* GetModuleGlobalName */
23833 #if CYTHON_USE_DICT_VERSIONS
23834 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
23835 #else
23836 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
23837 #endif
23838 {
23839  PyObject *result;
23840 #if !CYTHON_AVOID_BORROWED_REFS
23841 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
23842  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
23843  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
23844  if (likely(result)) {
23845  return __Pyx_NewRef(result);
23846  } else if (unlikely(PyErr_Occurred())) {
23847  return NULL;
23848  }
23849 #else
23850  result = PyDict_GetItem(__pyx_d, name);
23851  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
23852  if (likely(result)) {
23853  return __Pyx_NewRef(result);
23854  }
23855 #endif
23856 #else
23857  result = PyObject_GetItem(__pyx_d, name);
23858  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
23859  if (likely(result)) {
23860  return __Pyx_NewRef(result);
23861  }
23862  PyErr_Clear();
23863 #endif
23864  return __Pyx_GetBuiltinName(name);
23865 }
23866 
23867 /* PyObjectCall2Args */
23868 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
23869  PyObject *args, *result = NULL;
23870  #if CYTHON_FAST_PYCALL
23871  if (PyFunction_Check(function)) {
23872  PyObject *args[2] = {arg1, arg2};
23873  return __Pyx_PyFunction_FastCall(function, args, 2);
23874  }
23875  #endif
23876  #if CYTHON_FAST_PYCCALL
23877  if (__Pyx_PyFastCFunction_Check(function)) {
23878  PyObject *args[2] = {arg1, arg2};
23879  return __Pyx_PyCFunction_FastCall(function, args, 2);
23880  }
23881  #endif
23882  args = PyTuple_New(2);
23883  if (unlikely(!args)) goto done;
23884  Py_INCREF(arg1);
23885  PyTuple_SET_ITEM(args, 0, arg1);
23886  Py_INCREF(arg2);
23887  PyTuple_SET_ITEM(args, 1, arg2);
23888  Py_INCREF(function);
23889  result = __Pyx_PyObject_Call(function, args, NULL);
23890  Py_DECREF(args);
23891  Py_DECREF(function);
23892 done:
23893  return result;
23894 }
23895 
23896 /* UnicodeEquals */
23897 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
23898 #if CYTHON_COMPILING_IN_PYPY
23899  return PyObject_RichCompareBool(s1, s2, equals);
23900 #else
23901 #if PY_MAJOR_VERSION < 3
23902  PyObject* owned_ref = NULL;
23903 #endif
23904  int s1_is_unicode, s2_is_unicode;
23905  if (s1 == s2) {
23906  goto return_eq;
23907  }
23908  s1_is_unicode = PyUnicode_CheckExact(s1);
23909  s2_is_unicode = PyUnicode_CheckExact(s2);
23910 #if PY_MAJOR_VERSION < 3
23911  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
23912  owned_ref = PyUnicode_FromObject(s2);
23913  if (unlikely(!owned_ref))
23914  return -1;
23915  s2 = owned_ref;
23916  s2_is_unicode = 1;
23917  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
23918  owned_ref = PyUnicode_FromObject(s1);
23919  if (unlikely(!owned_ref))
23920  return -1;
23921  s1 = owned_ref;
23922  s1_is_unicode = 1;
23923  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
23924  return __Pyx_PyBytes_Equals(s1, s2, equals);
23925  }
23926 #endif
23927  if (s1_is_unicode & s2_is_unicode) {
23928  Py_ssize_t length;
23929  int kind;
23930  void *data1, *data2;
23931  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
23932  return -1;
23933  length = __Pyx_PyUnicode_GET_LENGTH(s1);
23934  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
23935  goto return_ne;
23936  }
23937 #if CYTHON_USE_UNICODE_INTERNALS
23938  {
23939  Py_hash_t hash1, hash2;
23940  #if CYTHON_PEP393_ENABLED
23941  hash1 = ((PyASCIIObject*)s1)->hash;
23942  hash2 = ((PyASCIIObject*)s2)->hash;
23943  #else
23944  hash1 = ((PyUnicodeObject*)s1)->hash;
23945  hash2 = ((PyUnicodeObject*)s2)->hash;
23946  #endif
23947  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
23948  goto return_ne;
23949  }
23950  }
23951 #endif
23952  kind = __Pyx_PyUnicode_KIND(s1);
23953  if (kind != __Pyx_PyUnicode_KIND(s2)) {
23954  goto return_ne;
23955  }
23956  data1 = __Pyx_PyUnicode_DATA(s1);
23957  data2 = __Pyx_PyUnicode_DATA(s2);
23958  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
23959  goto return_ne;
23960  } else if (length == 1) {
23961  goto return_eq;
23962  } else {
23963  int result = memcmp(data1, data2, (size_t)(length * kind));
23964  #if PY_MAJOR_VERSION < 3
23965  Py_XDECREF(owned_ref);
23966  #endif
23967  return (equals == Py_EQ) ? (result == 0) : (result != 0);
23968  }
23969  } else if ((s1 == Py_None) & s2_is_unicode) {
23970  goto return_ne;
23971  } else if ((s2 == Py_None) & s1_is_unicode) {
23972  goto return_ne;
23973  } else {
23974  int result;
23975  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
23976  #if PY_MAJOR_VERSION < 3
23977  Py_XDECREF(owned_ref);
23978  #endif
23979  if (!py_result)
23980  return -1;
23981  result = __Pyx_PyObject_IsTrue(py_result);
23982  Py_DECREF(py_result);
23983  return result;
23984  }
23985 return_eq:
23986  #if PY_MAJOR_VERSION < 3
23987  Py_XDECREF(owned_ref);
23988  #endif
23989  return (equals == Py_EQ);
23990 return_ne:
23991  #if PY_MAJOR_VERSION < 3
23992  Py_XDECREF(owned_ref);
23993  #endif
23994  return (equals == Py_NE);
23995 #endif
23996 }
23997 
23998 /* MemviewSliceInit */
23999 static int
24000 __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
24001  int ndim,
24002  __Pyx_memviewslice *memviewslice,
24003  int memview_is_new_reference)
24004 {
24005  __Pyx_RefNannyDeclarations
24006  int i, retval=-1;
24007  Py_buffer *buf = &memview->view;
24008  __Pyx_RefNannySetupContext("init_memviewslice", 0);
24009  if (unlikely(memviewslice->memview || memviewslice->data)) {
24010  PyErr_SetString(PyExc_ValueError,
24011  "memviewslice is already initialized!");
24012  goto fail;
24013  }
24014  if (buf->strides) {
24015  for (i = 0; i < ndim; i++) {
24016  memviewslice->strides[i] = buf->strides[i];
24017  }
24018  } else {
24019  Py_ssize_t stride = buf->itemsize;
24020  for (i = ndim - 1; i >= 0; i--) {
24021  memviewslice->strides[i] = stride;
24022  stride *= buf->shape[i];
24023  }
24024  }
24025  for (i = 0; i < ndim; i++) {
24026  memviewslice->shape[i] = buf->shape[i];
24027  if (buf->suboffsets) {
24028  memviewslice->suboffsets[i] = buf->suboffsets[i];
24029  } else {
24030  memviewslice->suboffsets[i] = -1;
24031  }
24032  }
24033  memviewslice->memview = memview;
24034  memviewslice->data = (char *)buf->buf;
24035  if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
24036  Py_INCREF(memview);
24037  }
24038  retval = 0;
24039  goto no_fail;
24040 fail:
24041  memviewslice->memview = 0;
24042  memviewslice->data = 0;
24043  retval = -1;
24044 no_fail:
24045  __Pyx_RefNannyFinishContext();
24046  return retval;
24047 }
24048 #ifndef Py_NO_RETURN
24049 #define Py_NO_RETURN
24050 #endif
24051 static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
24052  va_list vargs;
24053  char msg[200];
24054 #if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
24055  va_start(vargs, fmt);
24056 #else
24057  va_start(vargs);
24058 #endif
24059  vsnprintf(msg, 200, fmt, vargs);
24060  va_end(vargs);
24061  Py_FatalError(msg);
24062 }
24063 static CYTHON_INLINE int
24064 __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
24065  PyThread_type_lock lock)
24066 {
24067  int result;
24068  PyThread_acquire_lock(lock, 1);
24069  result = (*acquisition_count)++;
24070  PyThread_release_lock(lock);
24071  return result;
24072 }
24073 static CYTHON_INLINE int
24074 __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
24075  PyThread_type_lock lock)
24076 {
24077  int result;
24078  PyThread_acquire_lock(lock, 1);
24079  result = (*acquisition_count)--;
24080  PyThread_release_lock(lock);
24081  return result;
24082 }
24083 static CYTHON_INLINE void
24084 __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
24085 {
24086  int first_time;
24087  struct __pyx_memoryview_obj *memview = memslice->memview;
24088  if (unlikely(!memview || (PyObject *) memview == Py_None))
24089  return;
24090  if (unlikely(__pyx_get_slice_count(memview) < 0))
24091  __pyx_fatalerror("Acquisition count is %d (line %d)",
24092  __pyx_get_slice_count(memview), lineno);
24093  first_time = __pyx_add_acquisition_count(memview) == 0;
24094  if (unlikely(first_time)) {
24095  if (have_gil) {
24096  Py_INCREF((PyObject *) memview);
24097  } else {
24098  PyGILState_STATE _gilstate = PyGILState_Ensure();
24099  Py_INCREF((PyObject *) memview);
24100  PyGILState_Release(_gilstate);
24101  }
24102  }
24103 }
24104 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
24105  int have_gil, int lineno) {
24106  int last_time;
24107  struct __pyx_memoryview_obj *memview = memslice->memview;
24108  if (unlikely(!memview || (PyObject *) memview == Py_None)) {
24109  memslice->memview = NULL;
24110  return;
24111  }
24112  if (unlikely(__pyx_get_slice_count(memview) <= 0))
24113  __pyx_fatalerror("Acquisition count is %d (line %d)",
24114  __pyx_get_slice_count(memview), lineno);
24115  last_time = __pyx_sub_acquisition_count(memview) == 1;
24116  memslice->data = NULL;
24117  if (unlikely(last_time)) {
24118  if (have_gil) {
24119  Py_CLEAR(memslice->memview);
24120  } else {
24121  PyGILState_STATE _gilstate = PyGILState_Ensure();
24122  Py_CLEAR(memslice->memview);
24123  PyGILState_Release(_gilstate);
24124  }
24125  } else {
24126  memslice->memview = NULL;
24127  }
24128 }
24129 
24130 /* RaiseDoubleKeywords */
24131 static void __Pyx_RaiseDoubleKeywordsError(
24132  const char* func_name,
24133  PyObject* kw_name)
24134 {
24135  PyErr_Format(PyExc_TypeError,
24136  #if PY_MAJOR_VERSION >= 3
24137  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
24138  #else
24139  "%s() got multiple values for keyword argument '%s'", func_name,
24140  PyString_AsString(kw_name));
24141  #endif
24142 }
24143 
24144 /* ParseKeywords */
24145 static int __Pyx_ParseOptionalKeywords(
24146  PyObject *kwds,
24147  PyObject **argnames[],
24148  PyObject *kwds2,
24149  PyObject *values[],
24150  Py_ssize_t num_pos_args,
24151  const char* function_name)
24152 {
24153  PyObject *key = 0, *value = 0;
24154  Py_ssize_t pos = 0;
24155  PyObject*** name;
24156  PyObject*** first_kw_arg = argnames + num_pos_args;
24157  while (PyDict_Next(kwds, &pos, &key, &value)) {
24158  name = first_kw_arg;
24159  while (*name && (**name != key)) name++;
24160  if (*name) {
24161  values[name-argnames] = value;
24162  continue;
24163  }
24164  name = first_kw_arg;
24165  #if PY_MAJOR_VERSION < 3
24166  if (likely(PyString_Check(key))) {
24167  while (*name) {
24168  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
24169  && _PyString_Eq(**name, key)) {
24170  values[name-argnames] = value;
24171  break;
24172  }
24173  name++;
24174  }
24175  if (*name) continue;
24176  else {
24177  PyObject*** argname = argnames;
24178  while (argname != first_kw_arg) {
24179  if ((**argname == key) || (
24180  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
24181  && _PyString_Eq(**argname, key))) {
24182  goto arg_passed_twice;
24183  }
24184  argname++;
24185  }
24186  }
24187  } else
24188  #endif
24189  if (likely(PyUnicode_Check(key))) {
24190  while (*name) {
24191  int cmp = (**name == key) ? 0 :
24192  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
24193  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
24194  #endif
24195  PyUnicode_Compare(**name, key);
24196  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
24197  if (cmp == 0) {
24198  values[name-argnames] = value;
24199  break;
24200  }
24201  name++;
24202  }
24203  if (*name) continue;
24204  else {
24205  PyObject*** argname = argnames;
24206  while (argname != first_kw_arg) {
24207  int cmp = (**argname == key) ? 0 :
24208  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
24209  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
24210  #endif
24211  PyUnicode_Compare(**argname, key);
24212  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
24213  if (cmp == 0) goto arg_passed_twice;
24214  argname++;
24215  }
24216  }
24217  } else
24218  goto invalid_keyword_type;
24219  if (kwds2) {
24220  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
24221  } else {
24222  goto invalid_keyword;
24223  }
24224  }
24225  return 0;
24226 arg_passed_twice:
24227  __Pyx_RaiseDoubleKeywordsError(function_name, key);
24228  goto bad;
24229 invalid_keyword_type:
24230  PyErr_Format(PyExc_TypeError,
24231  "%.200s() keywords must be strings", function_name);
24232  goto bad;
24233 invalid_keyword:
24234  PyErr_Format(PyExc_TypeError,
24235  #if PY_MAJOR_VERSION < 3
24236  "%.200s() got an unexpected keyword argument '%.200s'",
24237  function_name, PyString_AsString(key));
24238  #else
24239  "%s() got an unexpected keyword argument '%U'",
24240  function_name, key);
24241  #endif
24242 bad:
24243  return -1;
24244 }
24245 
24246 /* ArgTypeTest */
24247 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
24248 {
24249  if (unlikely(!type)) {
24250  PyErr_SetString(PyExc_SystemError, "Missing type object");
24251  return 0;
24252  }
24253  else if (exact) {
24254  #if PY_MAJOR_VERSION == 2
24255  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
24256  #endif
24257  }
24258  else {
24259  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
24260  }
24261  PyErr_Format(PyExc_TypeError,
24262  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
24263  name, type->tp_name, Py_TYPE(obj)->tp_name);
24264  return 0;
24265 }
24266 
24267 /* GetAttr */
24268 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
24269 #if CYTHON_USE_TYPE_SLOTS
24270 #if PY_MAJOR_VERSION >= 3
24271  if (likely(PyUnicode_Check(n)))
24272 #else
24273  if (likely(PyString_Check(n)))
24274 #endif
24275  return __Pyx_PyObject_GetAttrStr(o, n);
24276 #endif
24277  return PyObject_GetAttr(o, n);
24278 }
24279 
24280 /* GetItemInt */
24281 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
24282  PyObject *r;
24283  if (!j) return NULL;
24284  r = PyObject_GetItem(o, j);
24285  Py_DECREF(j);
24286  return r;
24287 }
24288 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
24289  CYTHON_NCP_UNUSED int wraparound,
24290  CYTHON_NCP_UNUSED int boundscheck) {
24291 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24292  Py_ssize_t wrapped_i = i;
24293  if (wraparound & unlikely(i < 0)) {
24294  wrapped_i += PyList_GET_SIZE(o);
24295  }
24296  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
24297  PyObject *r = PyList_GET_ITEM(o, wrapped_i);
24298  Py_INCREF(r);
24299  return r;
24300  }
24301  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
24302 #else
24303  return PySequence_GetItem(o, i);
24304 #endif
24305 }
24306 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
24307  CYTHON_NCP_UNUSED int wraparound,
24308  CYTHON_NCP_UNUSED int boundscheck) {
24309 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24310  Py_ssize_t wrapped_i = i;
24311  if (wraparound & unlikely(i < 0)) {
24312  wrapped_i += PyTuple_GET_SIZE(o);
24313  }
24314  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
24315  PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
24316  Py_INCREF(r);
24317  return r;
24318  }
24319  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
24320 #else
24321  return PySequence_GetItem(o, i);
24322 #endif
24323 }
24324 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
24325  CYTHON_NCP_UNUSED int wraparound,
24326  CYTHON_NCP_UNUSED int boundscheck) {
24327 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
24328  if (is_list || PyList_CheckExact(o)) {
24329  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
24330  if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
24331  PyObject *r = PyList_GET_ITEM(o, n);
24332  Py_INCREF(r);
24333  return r;
24334  }
24335  }
24336  else if (PyTuple_CheckExact(o)) {
24337  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
24338  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
24339  PyObject *r = PyTuple_GET_ITEM(o, n);
24340  Py_INCREF(r);
24341  return r;
24342  }
24343  } else {
24344  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
24345  if (likely(m && m->sq_item)) {
24346  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
24347  Py_ssize_t l = m->sq_length(o);
24348  if (likely(l >= 0)) {
24349  i += l;
24350  } else {
24351  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
24352  return NULL;
24353  PyErr_Clear();
24354  }
24355  }
24356  return m->sq_item(o, i);
24357  }
24358  }
24359 #else
24360  if (is_list || PySequence_Check(o)) {
24361  return PySequence_GetItem(o, i);
24362  }
24363 #endif
24364  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
24365 }
24366 
24367 /* ObjectGetItem */
24368 #if CYTHON_USE_TYPE_SLOTS
24369 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
24370  PyObject *runerr = NULL;
24371  Py_ssize_t key_value;
24372  PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
24373  if (unlikely(!(m && m->sq_item))) {
24374  PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
24375  return NULL;
24376  }
24377  key_value = __Pyx_PyIndex_AsSsize_t(index);
24378  if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
24379  return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
24380  }
24381  if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
24382  PyErr_Clear();
24383  PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
24384  }
24385  return NULL;
24386 }
24387 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
24388  PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
24389  if (likely(m && m->mp_subscript)) {
24390  return m->mp_subscript(obj, key);
24391  }
24392  return __Pyx_PyObject_GetIndex(obj, key);
24393 }
24394 #endif
24395 
24396 /* decode_c_string */
24397 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
24398  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
24399  const char* encoding, const char* errors,
24400  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
24401  Py_ssize_t length;
24402  if (unlikely((start < 0) | (stop < 0))) {
24403  size_t slen = strlen(cstring);
24404  if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
24405  PyErr_SetString(PyExc_OverflowError,
24406  "c-string too long to convert to Python");
24407  return NULL;
24408  }
24409  length = (Py_ssize_t) slen;
24410  if (start < 0) {
24411  start += length;
24412  if (start < 0)
24413  start = 0;
24414  }
24415  if (stop < 0)
24416  stop += length;
24417  }
24418  if (unlikely(stop <= start))
24419  return __Pyx_NewRef(__pyx_empty_unicode);
24420  length = stop - start;
24421  cstring += start;
24422  if (decode_func) {
24423  return decode_func(cstring, length, errors);
24424  } else {
24425  return PyUnicode_Decode(cstring, length, encoding, errors);
24426  }
24427 }
24428 
24429 /* PyErrExceptionMatches */
24430 #if CYTHON_FAST_THREAD_STATE
24431 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
24432  Py_ssize_t i, n;
24433  n = PyTuple_GET_SIZE(tuple);
24434 #if PY_MAJOR_VERSION >= 3
24435  for (i=0; i<n; i++) {
24436  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
24437  }
24438 #endif
24439  for (i=0; i<n; i++) {
24440  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
24441  }
24442  return 0;
24443 }
24444 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
24445  PyObject *exc_type = tstate->curexc_type;
24446  if (exc_type == err) return 1;
24447  if (unlikely(!exc_type)) return 0;
24448  if (unlikely(PyTuple_Check(err)))
24449  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
24450  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
24451 }
24452 #endif
24453 
24454 /* GetAttr3 */
24455 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
24456  __Pyx_PyThreadState_declare
24457  __Pyx_PyThreadState_assign
24458  if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
24459  return NULL;
24460  __Pyx_PyErr_Clear();
24461  Py_INCREF(d);
24462  return d;
24463 }
24464 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
24465  PyObject *r = __Pyx_GetAttr(o, n);
24466  return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
24467 }
24468 
24469 /* RaiseTooManyValuesToUnpack */
24470 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
24471  PyErr_Format(PyExc_ValueError,
24472  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
24473 }
24474 
24475 /* RaiseNeedMoreValuesToUnpack */
24476 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
24477  PyErr_Format(PyExc_ValueError,
24478  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
24479  index, (index == 1) ? "" : "s");
24480 }
24481 
24482 /* RaiseNoneIterError */
24483 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
24484  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
24485 }
24486 
24487 /* ExtTypeTest */
24488 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
24489  if (unlikely(!type)) {
24490  PyErr_SetString(PyExc_SystemError, "Missing type object");
24491  return 0;
24492  }
24493  if (likely(__Pyx_TypeCheck(obj, type)))
24494  return 1;
24495  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
24496  Py_TYPE(obj)->tp_name, type->tp_name);
24497  return 0;
24498 }
24499 
24500 /* GetTopmostException */
24501 #if CYTHON_USE_EXC_INFO_STACK
24502 static _PyErr_StackItem *
24503 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
24504 {
24505  _PyErr_StackItem *exc_info = tstate->exc_info;
24506  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
24507  exc_info->previous_item != NULL)
24508  {
24509  exc_info = exc_info->previous_item;
24510  }
24511  return exc_info;
24512 }
24513 #endif
24514 
24515 /* SaveResetException */
24516 #if CYTHON_FAST_THREAD_STATE
24517 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
24518  #if CYTHON_USE_EXC_INFO_STACK
24519  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
24520  *type = exc_info->exc_type;
24521  *value = exc_info->exc_value;
24522  *tb = exc_info->exc_traceback;
24523  #else
24524  *type = tstate->exc_type;
24525  *value = tstate->exc_value;
24526  *tb = tstate->exc_traceback;
24527  #endif
24528  Py_XINCREF(*type);
24529  Py_XINCREF(*value);
24530  Py_XINCREF(*tb);
24531 }
24532 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
24533  PyObject *tmp_type, *tmp_value, *tmp_tb;
24534  #if CYTHON_USE_EXC_INFO_STACK
24535  _PyErr_StackItem *exc_info = tstate->exc_info;
24536  tmp_type = exc_info->exc_type;
24537  tmp_value = exc_info->exc_value;
24538  tmp_tb = exc_info->exc_traceback;
24539  exc_info->exc_type = type;
24540  exc_info->exc_value = value;
24541  exc_info->exc_traceback = tb;
24542  #else
24543  tmp_type = tstate->exc_type;
24544  tmp_value = tstate->exc_value;
24545  tmp_tb = tstate->exc_traceback;
24546  tstate->exc_type = type;
24547  tstate->exc_value = value;
24548  tstate->exc_traceback = tb;
24549  #endif
24550  Py_XDECREF(tmp_type);
24551  Py_XDECREF(tmp_value);
24552  Py_XDECREF(tmp_tb);
24553 }
24554 #endif
24555 
24556 /* GetException */
24557 #if CYTHON_FAST_THREAD_STATE
24558 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
24559 #else
24560 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
24561 #endif
24562 {
24563  PyObject *local_type, *local_value, *local_tb;
24564 #if CYTHON_FAST_THREAD_STATE
24565  PyObject *tmp_type, *tmp_value, *tmp_tb;
24566  local_type = tstate->curexc_type;
24567  local_value = tstate->curexc_value;
24568  local_tb = tstate->curexc_traceback;
24569  tstate->curexc_type = 0;
24570  tstate->curexc_value = 0;
24571  tstate->curexc_traceback = 0;
24572 #else
24573  PyErr_Fetch(&local_type, &local_value, &local_tb);
24574 #endif
24575  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
24576 #if CYTHON_FAST_THREAD_STATE
24577  if (unlikely(tstate->curexc_type))
24578 #else
24579  if (unlikely(PyErr_Occurred()))
24580 #endif
24581  goto bad;
24582  #if PY_MAJOR_VERSION >= 3
24583  if (local_tb) {
24584  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
24585  goto bad;
24586  }
24587  #endif
24588  Py_XINCREF(local_tb);
24589  Py_XINCREF(local_type);
24590  Py_XINCREF(local_value);
24591  *type = local_type;
24592  *value = local_value;
24593  *tb = local_tb;
24594 #if CYTHON_FAST_THREAD_STATE
24595  #if CYTHON_USE_EXC_INFO_STACK
24596  {
24597  _PyErr_StackItem *exc_info = tstate->exc_info;
24598  tmp_type = exc_info->exc_type;
24599  tmp_value = exc_info->exc_value;
24600  tmp_tb = exc_info->exc_traceback;
24601  exc_info->exc_type = local_type;
24602  exc_info->exc_value = local_value;
24603  exc_info->exc_traceback = local_tb;
24604  }
24605  #else
24606  tmp_type = tstate->exc_type;
24607  tmp_value = tstate->exc_value;
24608  tmp_tb = tstate->exc_traceback;
24609  tstate->exc_type = local_type;
24610  tstate->exc_value = local_value;
24611  tstate->exc_traceback = local_tb;
24612  #endif
24613  Py_XDECREF(tmp_type);
24614  Py_XDECREF(tmp_value);
24615  Py_XDECREF(tmp_tb);
24616 #else
24617  PyErr_SetExcInfo(local_type, local_value, local_tb);
24618 #endif
24619  return 0;
24620 bad:
24621  *type = 0;
24622  *value = 0;
24623  *tb = 0;
24624  Py_XDECREF(local_type);
24625  Py_XDECREF(local_value);
24626  Py_XDECREF(local_tb);
24627  return -1;
24628 }
24629 
24630 /* SwapException */
24631 #if CYTHON_FAST_THREAD_STATE
24632 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
24633  PyObject *tmp_type, *tmp_value, *tmp_tb;
24634  #if CYTHON_USE_EXC_INFO_STACK
24635  _PyErr_StackItem *exc_info = tstate->exc_info;
24636  tmp_type = exc_info->exc_type;
24637  tmp_value = exc_info->exc_value;
24638  tmp_tb = exc_info->exc_traceback;
24639  exc_info->exc_type = *type;
24640  exc_info->exc_value = *value;
24641  exc_info->exc_traceback = *tb;
24642  #else
24643  tmp_type = tstate->exc_type;
24644  tmp_value = tstate->exc_value;
24645  tmp_tb = tstate->exc_traceback;
24646  tstate->exc_type = *type;
24647  tstate->exc_value = *value;
24648  tstate->exc_traceback = *tb;
24649  #endif
24650  *type = tmp_type;
24651  *value = tmp_value;
24652  *tb = tmp_tb;
24653 }
24654 #else
24655 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
24656  PyObject *tmp_type, *tmp_value, *tmp_tb;
24657  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
24658  PyErr_SetExcInfo(*type, *value, *tb);
24659  *type = tmp_type;
24660  *value = tmp_value;
24661  *tb = tmp_tb;
24662 }
24663 #endif
24664 
24665 /* Import */
24666 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
24667  PyObject *empty_list = 0;
24668  PyObject *module = 0;
24669  PyObject *global_dict = 0;
24670  PyObject *empty_dict = 0;
24671  PyObject *list;
24672  #if PY_MAJOR_VERSION < 3
24673  PyObject *py_import;
24674  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
24675  if (!py_import)
24676  goto bad;
24677  #endif
24678  if (from_list)
24679  list = from_list;
24680  else {
24681  empty_list = PyList_New(0);
24682  if (!empty_list)
24683  goto bad;
24684  list = empty_list;
24685  }
24686  global_dict = PyModule_GetDict(__pyx_m);
24687  if (!global_dict)
24688  goto bad;
24689  empty_dict = PyDict_New();
24690  if (!empty_dict)
24691  goto bad;
24692  {
24693  #if PY_MAJOR_VERSION >= 3
24694  if (level == -1) {
24695  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
24696  module = PyImport_ImportModuleLevelObject(
24697  name, global_dict, empty_dict, list, 1);
24698  if (!module) {
24699  if (!PyErr_ExceptionMatches(PyExc_ImportError))
24700  goto bad;
24701  PyErr_Clear();
24702  }
24703  }
24704  level = 0;
24705  }
24706  #endif
24707  if (!module) {
24708  #if PY_MAJOR_VERSION < 3
24709  PyObject *py_level = PyInt_FromLong(level);
24710  if (!py_level)
24711  goto bad;
24712  module = PyObject_CallFunctionObjArgs(py_import,
24713  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
24714  Py_DECREF(py_level);
24715  #else
24716  module = PyImport_ImportModuleLevelObject(
24717  name, global_dict, empty_dict, list, level);
24718  #endif
24719  }
24720  }
24721 bad:
24722  #if PY_MAJOR_VERSION < 3
24723  Py_XDECREF(py_import);
24724  #endif
24725  Py_XDECREF(empty_list);
24726  Py_XDECREF(empty_dict);
24727  return module;
24728 }
24729 
24730 /* FastTypeChecks */
24731 #if CYTHON_COMPILING_IN_CPYTHON
24732 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
24733  while (a) {
24734  a = a->tp_base;
24735  if (a == b)
24736  return 1;
24737  }
24738  return b == &PyBaseObject_Type;
24739 }
24740 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
24741  PyObject *mro;
24742  if (a == b) return 1;
24743  mro = a->tp_mro;
24744  if (likely(mro)) {
24745  Py_ssize_t i, n;
24746  n = PyTuple_GET_SIZE(mro);
24747  for (i = 0; i < n; i++) {
24748  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
24749  return 1;
24750  }
24751  return 0;
24752  }
24753  return __Pyx_InBases(a, b);
24754 }
24755 #if PY_MAJOR_VERSION == 2
24756 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
24757  PyObject *exception, *value, *tb;
24758  int res;
24759  __Pyx_PyThreadState_declare
24760  __Pyx_PyThreadState_assign
24761  __Pyx_ErrFetch(&exception, &value, &tb);
24762  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
24763  if (unlikely(res == -1)) {
24764  PyErr_WriteUnraisable(err);
24765  res = 0;
24766  }
24767  if (!res) {
24768  res = PyObject_IsSubclass(err, exc_type2);
24769  if (unlikely(res == -1)) {
24770  PyErr_WriteUnraisable(err);
24771  res = 0;
24772  }
24773  }
24774  __Pyx_ErrRestore(exception, value, tb);
24775  return res;
24776 }
24777 #else
24778 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
24779  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
24780  if (!res) {
24781  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
24782  }
24783  return res;
24784 }
24785 #endif
24786 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
24787  Py_ssize_t i, n;
24788  assert(PyExceptionClass_Check(exc_type));
24789  n = PyTuple_GET_SIZE(tuple);
24790 #if PY_MAJOR_VERSION >= 3
24791  for (i=0; i<n; i++) {
24792  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
24793  }
24794 #endif
24795  for (i=0; i<n; i++) {
24796  PyObject *t = PyTuple_GET_ITEM(tuple, i);
24797  #if PY_MAJOR_VERSION < 3
24798  if (likely(exc_type == t)) return 1;
24799  #endif
24800  if (likely(PyExceptionClass_Check(t))) {
24801  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
24802  } else {
24803  }
24804  }
24805  return 0;
24806 }
24807 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
24808  if (likely(err == exc_type)) return 1;
24809  if (likely(PyExceptionClass_Check(err))) {
24810  if (likely(PyExceptionClass_Check(exc_type))) {
24811  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
24812  } else if (likely(PyTuple_Check(exc_type))) {
24813  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
24814  } else {
24815  }
24816  }
24817  return PyErr_GivenExceptionMatches(err, exc_type);
24818 }
24819 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
24820  assert(PyExceptionClass_Check(exc_type1));
24821  assert(PyExceptionClass_Check(exc_type2));
24822  if (likely(err == exc_type1 || err == exc_type2)) return 1;
24823  if (likely(PyExceptionClass_Check(err))) {
24824  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
24825  }
24826  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
24827 }
24828 #endif
24829 
24830 /* PyIntBinop */
24831 #if !CYTHON_COMPILING_IN_PYPY
24832 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
24833  (void)inplace;
24834  (void)zerodivision_check;
24835  #if PY_MAJOR_VERSION < 3
24836  if (likely(PyInt_CheckExact(op1))) {
24837  const long b = intval;
24838  long x;
24839  long a = PyInt_AS_LONG(op1);
24840  x = (long)((unsigned long)a + b);
24841  if (likely((x^a) >= 0 || (x^b) >= 0))
24842  return PyInt_FromLong(x);
24843  return PyLong_Type.tp_as_number->nb_add(op1, op2);
24844  }
24845  #endif
24846  #if CYTHON_USE_PYLONG_INTERNALS
24847  if (likely(PyLong_CheckExact(op1))) {
24848  const long b = intval;
24849  long a, x;
24850 #ifdef HAVE_LONG_LONG
24851  const PY_LONG_LONG llb = intval;
24852  PY_LONG_LONG lla, llx;
24853 #endif
24854  const digit* digits = ((PyLongObject*)op1)->ob_digit;
24855  const Py_ssize_t size = Py_SIZE(op1);
24856  if (likely(__Pyx_sst_abs(size) <= 1)) {
24857  a = likely(size) ? digits[0] : 0;
24858  if (size == -1) a = -a;
24859  } else {
24860  switch (size) {
24861  case -2:
24862  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
24863  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24864  break;
24865 #ifdef HAVE_LONG_LONG
24866  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
24867  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24868  goto long_long;
24869 #endif
24870  }
24871  CYTHON_FALLTHROUGH;
24872  case 2:
24873  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
24874  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24875  break;
24876 #ifdef HAVE_LONG_LONG
24877  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
24878  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24879  goto long_long;
24880 #endif
24881  }
24882  CYTHON_FALLTHROUGH;
24883  case -3:
24884  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
24885  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24886  break;
24887 #ifdef HAVE_LONG_LONG
24888  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
24889  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24890  goto long_long;
24891 #endif
24892  }
24893  CYTHON_FALLTHROUGH;
24894  case 3:
24895  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
24896  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24897  break;
24898 #ifdef HAVE_LONG_LONG
24899  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
24900  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24901  goto long_long;
24902 #endif
24903  }
24904  CYTHON_FALLTHROUGH;
24905  case -4:
24906  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
24907  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24908  break;
24909 #ifdef HAVE_LONG_LONG
24910  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
24911  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24912  goto long_long;
24913 #endif
24914  }
24915  CYTHON_FALLTHROUGH;
24916  case 4:
24917  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
24918  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
24919  break;
24920 #ifdef HAVE_LONG_LONG
24921  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
24922  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
24923  goto long_long;
24924 #endif
24925  }
24926  CYTHON_FALLTHROUGH;
24927  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
24928  }
24929  }
24930  x = a + b;
24931  return PyLong_FromLong(x);
24932 #ifdef HAVE_LONG_LONG
24933  long_long:
24934  llx = lla + llb;
24935  return PyLong_FromLongLong(llx);
24936 #endif
24937 
24938 
24939  }
24940  #endif
24941  if (PyFloat_CheckExact(op1)) {
24942  const long b = intval;
24943  double a = PyFloat_AS_DOUBLE(op1);
24944  double result;
24945  PyFPE_START_PROTECT("add", return NULL)
24946  result = ((double)a) + (double)b;
24947  PyFPE_END_PROTECT(result)
24948  return PyFloat_FromDouble(result);
24949  }
24950  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
24951 }
24952 #endif
24953 
24954 /* None */
24955 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
24956  PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
24957 }
24958 
24959 /* ImportFrom */
24960 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
24961  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
24962  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
24963  PyErr_Format(PyExc_ImportError,
24964  #if PY_MAJOR_VERSION < 3
24965  "cannot import name %.230s", PyString_AS_STRING(name));
24966  #else
24967  "cannot import name %S", name);
24968  #endif
24969  }
24970  return value;
24971 }
24972 
24973 /* HasAttr */
24974 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
24975  PyObject *r;
24976  if (unlikely(!__Pyx_PyBaseString_Check(n))) {
24977  PyErr_SetString(PyExc_TypeError,
24978  "hasattr(): attribute name must be string");
24979  return -1;
24980  }
24981  r = __Pyx_GetAttr(o, n);
24982  if (unlikely(!r)) {
24983  PyErr_Clear();
24984  return 0;
24985  } else {
24986  Py_DECREF(r);
24987  return 1;
24988  }
24989 }
24990 
24991 /* PyObject_GenericGetAttrNoDict */
24992 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
24993 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
24994  PyErr_Format(PyExc_AttributeError,
24995 #if PY_MAJOR_VERSION >= 3
24996  "'%.50s' object has no attribute '%U'",
24997  tp->tp_name, attr_name);
24998 #else
24999  "'%.50s' object has no attribute '%.400s'",
25000  tp->tp_name, PyString_AS_STRING(attr_name));
25001 #endif
25002  return NULL;
25003 }
25004 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
25005  PyObject *descr;
25006  PyTypeObject *tp = Py_TYPE(obj);
25007  if (unlikely(!PyString_Check(attr_name))) {
25008  return PyObject_GenericGetAttr(obj, attr_name);
25009  }
25010  assert(!tp->tp_dictoffset);
25011  descr = _PyType_Lookup(tp, attr_name);
25012  if (unlikely(!descr)) {
25013  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
25014  }
25015  Py_INCREF(descr);
25016  #if PY_MAJOR_VERSION < 3
25017  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
25018  #endif
25019  {
25020  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
25021  if (unlikely(f)) {
25022  PyObject *res = f(descr, obj, (PyObject *)tp);
25023  Py_DECREF(descr);
25024  return res;
25025  }
25026  }
25027  return descr;
25028 }
25029 #endif
25030 
25031 /* PyObject_GenericGetAttr */
25032 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
25033 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
25034  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
25035  return PyObject_GenericGetAttr(obj, attr_name);
25036  }
25037  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
25038 }
25039 #endif
25040 
25041 /* SetVTable */
25042 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
25043 #if PY_VERSION_HEX >= 0x02070000
25044  PyObject *ob = PyCapsule_New(vtable, 0, 0);
25045 #else
25046  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
25047 #endif
25048  if (!ob)
25049  goto bad;
25050  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
25051  goto bad;
25052  Py_DECREF(ob);
25053  return 0;
25054 bad:
25055  Py_XDECREF(ob);
25056  return -1;
25057 }
25058 
25059 /* PyObjectGetAttrStrNoError */
25060 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
25061  __Pyx_PyThreadState_declare
25062  __Pyx_PyThreadState_assign
25063  if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
25064  __Pyx_PyErr_Clear();
25065 }
25066 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
25067  PyObject *result;
25068 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
25069  PyTypeObject* tp = Py_TYPE(obj);
25070  if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
25071  return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
25072  }
25073 #endif
25074  result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
25075  if (unlikely(!result)) {
25076  __Pyx_PyObject_GetAttrStr_ClearAttributeError();
25077  }
25078  return result;
25079 }
25080 
25081 /* SetupReduce */
25082 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
25083  int ret;
25084  PyObject *name_attr;
25085  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
25086  if (likely(name_attr)) {
25087  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
25088  } else {
25089  ret = -1;
25090  }
25091  if (unlikely(ret < 0)) {
25092  PyErr_Clear();
25093  ret = 0;
25094  }
25095  Py_XDECREF(name_attr);
25096  return ret;
25097 }
25098 static int __Pyx_setup_reduce(PyObject* type_obj) {
25099  int ret = 0;
25100  PyObject *object_reduce = NULL;
25101  PyObject *object_getstate = NULL;
25102  PyObject *object_reduce_ex = NULL;
25103  PyObject *reduce = NULL;
25104  PyObject *reduce_ex = NULL;
25105  PyObject *reduce_cython = NULL;
25106  PyObject *setstate = NULL;
25107  PyObject *setstate_cython = NULL;
25108  PyObject *getstate = NULL;
25109 #if CYTHON_USE_PYTYPE_LOOKUP
25110  getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
25111 #else
25112  getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
25113  if (!getstate && PyErr_Occurred()) {
25114  goto __PYX_BAD;
25115  }
25116 #endif
25117  if (getstate) {
25118 #if CYTHON_USE_PYTYPE_LOOKUP
25119  object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
25120 #else
25121  object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
25122  if (!object_getstate && PyErr_Occurred()) {
25123  goto __PYX_BAD;
25124  }
25125 #endif
25126  if (object_getstate != getstate) {
25127  goto __PYX_GOOD;
25128  }
25129  }
25130 #if CYTHON_USE_PYTYPE_LOOKUP
25131  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
25132 #else
25133  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
25134 #endif
25135  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
25136  if (reduce_ex == object_reduce_ex) {
25137 #if CYTHON_USE_PYTYPE_LOOKUP
25138  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
25139 #else
25140  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
25141 #endif
25142  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
25143  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
25144  reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
25145  if (likely(reduce_cython)) {
25146  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
25147  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
25148  } else if (reduce == object_reduce || PyErr_Occurred()) {
25149  goto __PYX_BAD;
25150  }
25151  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
25152  if (!setstate) PyErr_Clear();
25153  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
25154  setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
25155  if (likely(setstate_cython)) {
25156  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
25157  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
25158  } else if (!setstate || PyErr_Occurred()) {
25159  goto __PYX_BAD;
25160  }
25161  }
25162  PyType_Modified((PyTypeObject*)type_obj);
25163  }
25164  }
25165  goto __PYX_GOOD;
25166 __PYX_BAD:
25167  if (!PyErr_Occurred())
25168  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
25169  ret = -1;
25170 __PYX_GOOD:
25171 #if !CYTHON_USE_PYTYPE_LOOKUP
25172  Py_XDECREF(object_reduce);
25173  Py_XDECREF(object_reduce_ex);
25174  Py_XDECREF(object_getstate);
25175  Py_XDECREF(getstate);
25176 #endif
25177  Py_XDECREF(reduce);
25178  Py_XDECREF(reduce_ex);
25179  Py_XDECREF(reduce_cython);
25180  Py_XDECREF(setstate);
25181  Py_XDECREF(setstate_cython);
25182  return ret;
25183 }
25184 
25185 /* FetchCommonType */
25186 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
25187  PyObject* fake_module;
25188  PyTypeObject* cached_type = NULL;
25189  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
25190  if (!fake_module) return NULL;
25191  Py_INCREF(fake_module);
25192  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
25193  if (cached_type) {
25194  if (!PyType_Check((PyObject*)cached_type)) {
25195  PyErr_Format(PyExc_TypeError,
25196  "Shared Cython type %.200s is not a type object",
25197  type->tp_name);
25198  goto bad;
25199  }
25200  if (cached_type->tp_basicsize != type->tp_basicsize) {
25201  PyErr_Format(PyExc_TypeError,
25202  "Shared Cython type %.200s has the wrong size, try recompiling",
25203  type->tp_name);
25204  goto bad;
25205  }
25206  } else {
25207  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
25208  PyErr_Clear();
25209  if (PyType_Ready(type) < 0) goto bad;
25210  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
25211  goto bad;
25212  Py_INCREF(type);
25213  cached_type = type;
25214  }
25215 done:
25216  Py_DECREF(fake_module);
25217  return cached_type;
25218 bad:
25219  Py_XDECREF(cached_type);
25220  cached_type = NULL;
25221  goto done;
25222 }
25223 
25224 /* CythonFunctionShared */
25225 #include <structmember.h>
25226 static PyObject *
25227 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
25228 {
25229  if (unlikely(op->func_doc == NULL)) {
25230  if (op->func.m_ml->ml_doc) {
25231 #if PY_MAJOR_VERSION >= 3
25232  op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
25233 #else
25234  op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
25235 #endif
25236  if (unlikely(op->func_doc == NULL))
25237  return NULL;
25238  } else {
25239  Py_INCREF(Py_None);
25240  return Py_None;
25241  }
25242  }
25243  Py_INCREF(op->func_doc);
25244  return op->func_doc;
25245 }
25246 static int
25247 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
25248 {
25249  PyObject *tmp = op->func_doc;
25250  if (value == NULL) {
25251  value = Py_None;
25252  }
25253  Py_INCREF(value);
25254  op->func_doc = value;
25255  Py_XDECREF(tmp);
25256  return 0;
25257 }
25258 static PyObject *
25259 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25260 {
25261  if (unlikely(op->func_name == NULL)) {
25262 #if PY_MAJOR_VERSION >= 3
25263  op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
25264 #else
25265  op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
25266 #endif
25267  if (unlikely(op->func_name == NULL))
25268  return NULL;
25269  }
25270  Py_INCREF(op->func_name);
25271  return op->func_name;
25272 }
25273 static int
25274 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
25275 {
25276  PyObject *tmp;
25277 #if PY_MAJOR_VERSION >= 3
25278  if (unlikely(value == NULL || !PyUnicode_Check(value)))
25279 #else
25280  if (unlikely(value == NULL || !PyString_Check(value)))
25281 #endif
25282  {
25283  PyErr_SetString(PyExc_TypeError,
25284  "__name__ must be set to a string object");
25285  return -1;
25286  }
25287  tmp = op->func_name;
25288  Py_INCREF(value);
25289  op->func_name = value;
25290  Py_XDECREF(tmp);
25291  return 0;
25292 }
25293 static PyObject *
25294 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25295 {
25296  Py_INCREF(op->func_qualname);
25297  return op->func_qualname;
25298 }
25299 static int
25300 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
25301 {
25302  PyObject *tmp;
25303 #if PY_MAJOR_VERSION >= 3
25304  if (unlikely(value == NULL || !PyUnicode_Check(value)))
25305 #else
25306  if (unlikely(value == NULL || !PyString_Check(value)))
25307 #endif
25308  {
25309  PyErr_SetString(PyExc_TypeError,
25310  "__qualname__ must be set to a string object");
25311  return -1;
25312  }
25313  tmp = op->func_qualname;
25314  Py_INCREF(value);
25315  op->func_qualname = value;
25316  Py_XDECREF(tmp);
25317  return 0;
25318 }
25319 static PyObject *
25320 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
25321 {
25322  PyObject *self;
25323  self = m->func_closure;
25324  if (self == NULL)
25325  self = Py_None;
25326  Py_INCREF(self);
25327  return self;
25328 }
25329 static PyObject *
25330 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25331 {
25332  if (unlikely(op->func_dict == NULL)) {
25333  op->func_dict = PyDict_New();
25334  if (unlikely(op->func_dict == NULL))
25335  return NULL;
25336  }
25337  Py_INCREF(op->func_dict);
25338  return op->func_dict;
25339 }
25340 static int
25341 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
25342 {
25343  PyObject *tmp;
25344  if (unlikely(value == NULL)) {
25345  PyErr_SetString(PyExc_TypeError,
25346  "function's dictionary may not be deleted");
25347  return -1;
25348  }
25349  if (unlikely(!PyDict_Check(value))) {
25350  PyErr_SetString(PyExc_TypeError,
25351  "setting function's dictionary to a non-dict");
25352  return -1;
25353  }
25354  tmp = op->func_dict;
25355  Py_INCREF(value);
25356  op->func_dict = value;
25357  Py_XDECREF(tmp);
25358  return 0;
25359 }
25360 static PyObject *
25361 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25362 {
25363  Py_INCREF(op->func_globals);
25364  return op->func_globals;
25365 }
25366 static PyObject *
25367 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25368 {
25369  Py_INCREF(Py_None);
25370  return Py_None;
25371 }
25372 static PyObject *
25373 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
25374 {
25375  PyObject* result = (op->func_code) ? op->func_code : Py_None;
25376  Py_INCREF(result);
25377  return result;
25378 }
25379 static int
25380 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
25381  int result = 0;
25382  PyObject *res = op->defaults_getter((PyObject *) op);
25383  if (unlikely(!res))
25384  return -1;
25385  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25386  op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
25387  Py_INCREF(op->defaults_tuple);
25388  op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
25389  Py_INCREF(op->defaults_kwdict);
25390  #else
25391  op->defaults_tuple = PySequence_ITEM(res, 0);
25392  if (unlikely(!op->defaults_tuple)) result = -1;
25393  else {
25394  op->defaults_kwdict = PySequence_ITEM(res, 1);
25395  if (unlikely(!op->defaults_kwdict)) result = -1;
25396  }
25397  #endif
25398  Py_DECREF(res);
25399  return result;
25400 }
25401 static int
25402 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
25403  PyObject* tmp;
25404  if (!value) {
25405  value = Py_None;
25406  } else if (value != Py_None && !PyTuple_Check(value)) {
25407  PyErr_SetString(PyExc_TypeError,
25408  "__defaults__ must be set to a tuple object");
25409  return -1;
25410  }
25411  Py_INCREF(value);
25412  tmp = op->defaults_tuple;
25413  op->defaults_tuple = value;
25414  Py_XDECREF(tmp);
25415  return 0;
25416 }
25417 static PyObject *
25418 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
25419  PyObject* result = op->defaults_tuple;
25420  if (unlikely(!result)) {
25421  if (op->defaults_getter) {
25422  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
25423  result = op->defaults_tuple;
25424  } else {
25425  result = Py_None;
25426  }
25427  }
25428  Py_INCREF(result);
25429  return result;
25430 }
25431 static int
25432 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
25433  PyObject* tmp;
25434  if (!value) {
25435  value = Py_None;
25436  } else if (value != Py_None && !PyDict_Check(value)) {
25437  PyErr_SetString(PyExc_TypeError,
25438  "__kwdefaults__ must be set to a dict object");
25439  return -1;
25440  }
25441  Py_INCREF(value);
25442  tmp = op->defaults_kwdict;
25443  op->defaults_kwdict = value;
25444  Py_XDECREF(tmp);
25445  return 0;
25446 }
25447 static PyObject *
25448 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
25449  PyObject* result = op->defaults_kwdict;
25450  if (unlikely(!result)) {
25451  if (op->defaults_getter) {
25452  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
25453  result = op->defaults_kwdict;
25454  } else {
25455  result = Py_None;
25456  }
25457  }
25458  Py_INCREF(result);
25459  return result;
25460 }
25461 static int
25462 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
25463  PyObject* tmp;
25464  if (!value || value == Py_None) {
25465  value = NULL;
25466  } else if (!PyDict_Check(value)) {
25467  PyErr_SetString(PyExc_TypeError,
25468  "__annotations__ must be set to a dict object");
25469  return -1;
25470  }
25471  Py_XINCREF(value);
25472  tmp = op->func_annotations;
25473  op->func_annotations = value;
25474  Py_XDECREF(tmp);
25475  return 0;
25476 }
25477 static PyObject *
25478 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
25479  PyObject* result = op->func_annotations;
25480  if (unlikely(!result)) {
25481  result = PyDict_New();
25482  if (unlikely(!result)) return NULL;
25483  op->func_annotations = result;
25484  }
25485  Py_INCREF(result);
25486  return result;
25487 }
25488 static PyGetSetDef __pyx_CyFunction_getsets[] = {
25489  {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
25490  {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
25491  {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
25492  {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
25493  {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
25494  {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
25495  {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
25496  {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
25497  {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
25498  {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
25499  {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
25500  {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
25501  {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
25502  {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
25503  {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
25504  {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
25505  {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
25506  {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
25507  {0, 0, 0, 0, 0}
25508 };
25509 static PyMemberDef __pyx_CyFunction_members[] = {
25510  {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
25511  {0, 0, 0, 0, 0}
25512 };
25513 static PyObject *
25514 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
25515 {
25516 #if PY_MAJOR_VERSION >= 3
25517  Py_INCREF(m->func_qualname);
25518  return m->func_qualname;
25519 #else
25520  return PyString_FromString(m->func.m_ml->ml_name);
25521 #endif
25522 }
25523 static PyMethodDef __pyx_CyFunction_methods[] = {
25524  {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
25525  {0, 0, 0, 0}
25526 };
25527 #if PY_VERSION_HEX < 0x030500A0
25528 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
25529 #else
25530 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
25531 #endif
25532 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
25533  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
25534  if (unlikely(op == NULL))
25535  return NULL;
25536  op->flags = flags;
25537  __Pyx_CyFunction_weakreflist(op) = NULL;
25538  op->func.m_ml = ml;
25539  op->func.m_self = (PyObject *) op;
25540  Py_XINCREF(closure);
25541  op->func_closure = closure;
25542  Py_XINCREF(module);
25543  op->func.m_module = module;
25544  op->func_dict = NULL;
25545  op->func_name = NULL;
25546  Py_INCREF(qualname);
25547  op->func_qualname = qualname;
25548  op->func_doc = NULL;
25549  op->func_classobj = NULL;
25550  op->func_globals = globals;
25551  Py_INCREF(op->func_globals);
25552  Py_XINCREF(code);
25553  op->func_code = code;
25554  op->defaults_pyobjects = 0;
25555  op->defaults_size = 0;
25556  op->defaults = NULL;
25557  op->defaults_tuple = NULL;
25558  op->defaults_kwdict = NULL;
25559  op->defaults_getter = NULL;
25560  op->func_annotations = NULL;
25561  return (PyObject *) op;
25562 }
25563 static int
25564 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
25565 {
25566  Py_CLEAR(m->func_closure);
25567  Py_CLEAR(m->func.m_module);
25568  Py_CLEAR(m->func_dict);
25569  Py_CLEAR(m->func_name);
25570  Py_CLEAR(m->func_qualname);
25571  Py_CLEAR(m->func_doc);
25572  Py_CLEAR(m->func_globals);
25573  Py_CLEAR(m->func_code);
25574  Py_CLEAR(m->func_classobj);
25575  Py_CLEAR(m->defaults_tuple);
25576  Py_CLEAR(m->defaults_kwdict);
25577  Py_CLEAR(m->func_annotations);
25578  if (m->defaults) {
25579  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
25580  int i;
25581  for (i = 0; i < m->defaults_pyobjects; i++)
25582  Py_XDECREF(pydefaults[i]);
25583  PyObject_Free(m->defaults);
25584  m->defaults = NULL;
25585  }
25586  return 0;
25587 }
25588 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
25589 {
25590  if (__Pyx_CyFunction_weakreflist(m) != NULL)
25591  PyObject_ClearWeakRefs((PyObject *) m);
25592  __Pyx_CyFunction_clear(m);
25593  PyObject_GC_Del(m);
25594 }
25595 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
25596 {
25597  PyObject_GC_UnTrack(m);
25598  __Pyx__CyFunction_dealloc(m);
25599 }
25600 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
25601 {
25602  Py_VISIT(m->func_closure);
25603  Py_VISIT(m->func.m_module);
25604  Py_VISIT(m->func_dict);
25605  Py_VISIT(m->func_name);
25606  Py_VISIT(m->func_qualname);
25607  Py_VISIT(m->func_doc);
25608  Py_VISIT(m->func_globals);
25609  Py_VISIT(m->func_code);
25610  Py_VISIT(m->func_classobj);
25611  Py_VISIT(m->defaults_tuple);
25612  Py_VISIT(m->defaults_kwdict);
25613  if (m->defaults) {
25614  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
25615  int i;
25616  for (i = 0; i < m->defaults_pyobjects; i++)
25617  Py_VISIT(pydefaults[i]);
25618  }
25619  return 0;
25620 }
25621 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
25622 {
25623 #if PY_MAJOR_VERSION < 3
25624  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
25625  if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
25626  Py_INCREF(func);
25627  return func;
25628  }
25629  if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
25630  if (type == NULL)
25631  type = (PyObject *)(Py_TYPE(obj));
25632  return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
25633  }
25634  if (obj == Py_None)
25635  obj = NULL;
25636 #endif
25637  return __Pyx_PyMethod_New(func, obj, type);
25638 }
25639 static PyObject*
25640 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
25641 {
25642 #if PY_MAJOR_VERSION >= 3
25643  return PyUnicode_FromFormat("<cyfunction %U at %p>",
25644  op->func_qualname, (void *)op);
25645 #else
25646  return PyString_FromFormat("<cyfunction %s at %p>",
25647  PyString_AsString(op->func_qualname), (void *)op);
25648 #endif
25649 }
25650 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
25651  PyCFunctionObject* f = (PyCFunctionObject*)func;
25652  PyCFunction meth = f->m_ml->ml_meth;
25653  Py_ssize_t size;
25654  switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
25655  case METH_VARARGS:
25656  if (likely(kw == NULL || PyDict_Size(kw) == 0))
25657  return (*meth)(self, arg);
25658  break;
25659  case METH_VARARGS | METH_KEYWORDS:
25660  return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
25661  case METH_NOARGS:
25662  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
25663  size = PyTuple_GET_SIZE(arg);
25664  if (likely(size == 0))
25665  return (*meth)(self, NULL);
25666  PyErr_Format(PyExc_TypeError,
25667  "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
25668  f->m_ml->ml_name, size);
25669  return NULL;
25670  }
25671  break;
25672  case METH_O:
25673  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
25674  size = PyTuple_GET_SIZE(arg);
25675  if (likely(size == 1)) {
25676  PyObject *result, *arg0;
25677  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25678  arg0 = PyTuple_GET_ITEM(arg, 0);
25679  #else
25680  arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
25681  #endif
25682  result = (*meth)(self, arg0);
25683  #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
25684  Py_DECREF(arg0);
25685  #endif
25686  return result;
25687  }
25688  PyErr_Format(PyExc_TypeError,
25689  "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
25690  f->m_ml->ml_name, size);
25691  return NULL;
25692  }
25693  break;
25694  default:
25695  PyErr_SetString(PyExc_SystemError, "Bad call flags in "
25696  "__Pyx_CyFunction_Call. METH_OLDARGS is no "
25697  "longer supported!");
25698  return NULL;
25699  }
25700  PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
25701  f->m_ml->ml_name);
25702  return NULL;
25703 }
25704 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
25705  return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
25706 }
25707 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
25708  PyObject *result;
25709  __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
25710  if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
25711  Py_ssize_t argc;
25712  PyObject *new_args;
25713  PyObject *self;
25714  argc = PyTuple_GET_SIZE(args);
25715  new_args = PyTuple_GetSlice(args, 1, argc);
25716  if (unlikely(!new_args))
25717  return NULL;
25718  self = PyTuple_GetItem(args, 0);
25719  if (unlikely(!self)) {
25720  Py_DECREF(new_args);
25721 #if PY_MAJOR_VERSION > 2
25722  PyErr_Format(PyExc_TypeError,
25723  "unbound method %.200S() needs an argument",
25724  cyfunc->func_qualname);
25725 #else
25726  PyErr_SetString(PyExc_TypeError,
25727  "unbound method needs an argument");
25728 #endif
25729  return NULL;
25730  }
25731  result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
25732  Py_DECREF(new_args);
25733  } else {
25734  result = __Pyx_CyFunction_Call(func, args, kw);
25735  }
25736  return result;
25737 }
25738 static PyTypeObject __pyx_CyFunctionType_type = {
25739  PyVarObject_HEAD_INIT(0, 0)
25740  "cython_function_or_method",
25741  sizeof(__pyx_CyFunctionObject),
25742  0,
25743  (destructor) __Pyx_CyFunction_dealloc,
25744  0,
25745  0,
25746  0,
25747 #if PY_MAJOR_VERSION < 3
25748  0,
25749 #else
25750  0,
25751 #endif
25752  (reprfunc) __Pyx_CyFunction_repr,
25753  0,
25754  0,
25755  0,
25756  0,
25757  __Pyx_CyFunction_CallAsMethod,
25758  0,
25759  0,
25760  0,
25761  0,
25762  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
25763  0,
25764  (traverseproc) __Pyx_CyFunction_traverse,
25765  (inquiry) __Pyx_CyFunction_clear,
25766  0,
25767 #if PY_VERSION_HEX < 0x030500A0
25768  offsetof(__pyx_CyFunctionObject, func_weakreflist),
25769 #else
25770  offsetof(PyCFunctionObject, m_weakreflist),
25771 #endif
25772  0,
25773  0,
25774  __pyx_CyFunction_methods,
25775  __pyx_CyFunction_members,
25776  __pyx_CyFunction_getsets,
25777  0,
25778  0,
25779  __Pyx_CyFunction_descr_get,
25780  0,
25781  offsetof(__pyx_CyFunctionObject, func_dict),
25782  0,
25783  0,
25784  0,
25785  0,
25786  0,
25787  0,
25788  0,
25789  0,
25790  0,
25791  0,
25792  0,
25793  0,
25794 #if PY_VERSION_HEX >= 0x030400a1
25795  0,
25796 #endif
25797 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
25798  0,
25799 #endif
25800 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
25801  0,
25802 #endif
25803 #if PY_VERSION_HEX >= 0x030C0000
25804  0,
25805 #endif
25806 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
25807  0,
25808 #endif
25809 };
25810 static int __pyx_CyFunction_init(void) {
25811  __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
25812  if (unlikely(__pyx_CyFunctionType == NULL)) {
25813  return -1;
25814  }
25815  return 0;
25816 }
25817 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
25818  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
25819  m->defaults = PyObject_Malloc(size);
25820  if (unlikely(!m->defaults))
25821  return PyErr_NoMemory();
25822  memset(m->defaults, 0, size);
25823  m->defaults_pyobjects = pyobjects;
25824  m->defaults_size = size;
25825  return m->defaults;
25826 }
25827 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
25828  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
25829  m->defaults_tuple = tuple;
25830  Py_INCREF(tuple);
25831 }
25832 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
25833  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
25834  m->defaults_kwdict = dict;
25835  Py_INCREF(dict);
25836 }
25837 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
25838  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
25839  m->func_annotations = dict;
25840  Py_INCREF(dict);
25841 }
25842 
25843 /* CythonFunction */
25844 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
25845  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
25846  PyObject *op = __Pyx_CyFunction_Init(
25847  PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
25848  ml, flags, qualname, closure, module, globals, code
25849  );
25850  if (likely(op)) {
25851  PyObject_GC_Track(op);
25852  }
25853  return op;
25854 }
25855 
25856 /* CLineInTraceback */
25857 #ifndef CYTHON_CLINE_IN_TRACEBACK
25858 static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
25859  PyObject *use_cline;
25860  PyObject *ptype, *pvalue, *ptraceback;
25861 #if CYTHON_COMPILING_IN_CPYTHON
25862  PyObject **cython_runtime_dict;
25863 #endif
25864  if (unlikely(!__pyx_cython_runtime)) {
25865  return c_line;
25866  }
25867  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
25868 #if CYTHON_COMPILING_IN_CPYTHON
25869  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
25870  if (likely(cython_runtime_dict)) {
25871  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
25872  use_cline, *cython_runtime_dict,
25873  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
25874  } else
25875 #endif
25876  {
25877  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
25878  if (use_cline_obj) {
25879  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
25880  Py_DECREF(use_cline_obj);
25881  } else {
25882  PyErr_Clear();
25883  use_cline = NULL;
25884  }
25885  }
25886  if (!use_cline) {
25887  c_line = 0;
25888  (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
25889  }
25890  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
25891  c_line = 0;
25892  }
25893  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
25894  return c_line;
25895 }
25896 #endif
25897 
25898 /* CodeObjectCache */
25899 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
25900  int start = 0, mid = 0, end = count - 1;
25901  if (end >= 0 && code_line > entries[end].code_line) {
25902  return count;
25903  }
25904  while (start < end) {
25905  mid = start + (end - start) / 2;
25906  if (code_line < entries[mid].code_line) {
25907  end = mid;
25908  } else if (code_line > entries[mid].code_line) {
25909  start = mid + 1;
25910  } else {
25911  return mid;
25912  }
25913  }
25914  if (code_line <= entries[mid].code_line) {
25915  return mid;
25916  } else {
25917  return mid + 1;
25918  }
25919 }
25920 static PyCodeObject *__pyx_find_code_object(int code_line) {
25921  PyCodeObject* code_object;
25922  int pos;
25923  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
25924  return NULL;
25925  }
25926  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
25927  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
25928  return NULL;
25929  }
25930  code_object = __pyx_code_cache.entries[pos].code_object;
25931  Py_INCREF(code_object);
25932  return code_object;
25933 }
25934 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
25935  int pos, i;
25936  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
25937  if (unlikely(!code_line)) {
25938  return;
25939  }
25940  if (unlikely(!entries)) {
25941  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
25942  if (likely(entries)) {
25943  __pyx_code_cache.entries = entries;
25944  __pyx_code_cache.max_count = 64;
25945  __pyx_code_cache.count = 1;
25946  entries[0].code_line = code_line;
25947  entries[0].code_object = code_object;
25948  Py_INCREF(code_object);
25949  }
25950  return;
25951  }
25952  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
25953  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
25954  PyCodeObject* tmp = entries[pos].code_object;
25955  entries[pos].code_object = code_object;
25956  Py_DECREF(tmp);
25957  return;
25958  }
25959  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
25960  int new_max = __pyx_code_cache.max_count + 64;
25961  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
25962  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
25963  if (unlikely(!entries)) {
25964  return;
25965  }
25966  __pyx_code_cache.entries = entries;
25967  __pyx_code_cache.max_count = new_max;
25968  }
25969  for (i=__pyx_code_cache.count; i>pos; i--) {
25970  entries[i] = entries[i-1];
25971  }
25972  entries[pos].code_line = code_line;
25973  entries[pos].code_object = code_object;
25974  __pyx_code_cache.count++;
25975  Py_INCREF(code_object);
25976 }
25977 
25978 /* AddTraceback */
25979 #include "compile.h"
25980 #include "frameobject.h"
25981 #include "traceback.h"
25982 #if PY_VERSION_HEX >= 0x030b00a6
25983  #ifndef Py_BUILD_CORE
25984  #define Py_BUILD_CORE 1
25985  #endif
25986  #include "internal/pycore_frame.h"
25987 #endif
25988 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
25989  const char *funcname, int c_line,
25990  int py_line, const char *filename) {
25991  PyCodeObject *py_code = NULL;
25992  PyObject *py_funcname = NULL;
25993  #if PY_MAJOR_VERSION < 3
25994  PyObject *py_srcfile = NULL;
25995  py_srcfile = PyString_FromString(filename);
25996  if (!py_srcfile) goto bad;
25997  #endif
25998  if (c_line) {
25999  #if PY_MAJOR_VERSION < 3
26000  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
26001  if (!py_funcname) goto bad;
26002  #else
26003  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
26004  if (!py_funcname) goto bad;
26005  funcname = PyUnicode_AsUTF8(py_funcname);
26006  if (!funcname) goto bad;
26007  #endif
26008  }
26009  else {
26010  #if PY_MAJOR_VERSION < 3
26011  py_funcname = PyString_FromString(funcname);
26012  if (!py_funcname) goto bad;
26013  #endif
26014  }
26015  #if PY_MAJOR_VERSION < 3
26016  py_code = __Pyx_PyCode_New(
26017  0,
26018  0,
26019  0,
26020  0,
26021  0,
26022  __pyx_empty_bytes, /*PyObject *code,*/
26023  __pyx_empty_tuple, /*PyObject *consts,*/
26024  __pyx_empty_tuple, /*PyObject *names,*/
26025  __pyx_empty_tuple, /*PyObject *varnames,*/
26026  __pyx_empty_tuple, /*PyObject *freevars,*/
26027  __pyx_empty_tuple, /*PyObject *cellvars,*/
26028  py_srcfile, /*PyObject *filename,*/
26029  py_funcname, /*PyObject *name,*/
26030  py_line,
26031  __pyx_empty_bytes /*PyObject *lnotab*/
26032  );
26033  Py_DECREF(py_srcfile);
26034  #else
26035  py_code = PyCode_NewEmpty(filename, funcname, py_line);
26036  #endif
26037  Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
26038  return py_code;
26039 bad:
26040  Py_XDECREF(py_funcname);
26041  #if PY_MAJOR_VERSION < 3
26042  Py_XDECREF(py_srcfile);
26043  #endif
26044  return NULL;
26045 }
26046 static void __Pyx_AddTraceback(const char *funcname, int c_line,
26047  int py_line, const char *filename) {
26048  PyCodeObject *py_code = 0;
26049  PyFrameObject *py_frame = 0;
26050  PyThreadState *tstate = __Pyx_PyThreadState_Current;
26051  PyObject *ptype, *pvalue, *ptraceback;
26052  if (c_line) {
26053  c_line = __Pyx_CLineForTraceback(tstate, c_line);
26054  }
26055  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
26056  if (!py_code) {
26057  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
26058  py_code = __Pyx_CreateCodeObjectForTraceback(
26059  funcname, c_line, py_line, filename);
26060  if (!py_code) {
26061  /* If the code object creation fails, then we should clear the
26062  fetched exception references and propagate the new exception */
26063  Py_XDECREF(ptype);
26064  Py_XDECREF(pvalue);
26065  Py_XDECREF(ptraceback);
26066  goto bad;
26067  }
26068  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
26069  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
26070  }
26071  py_frame = PyFrame_New(
26072  tstate, /*PyThreadState *tstate,*/
26073  py_code, /*PyCodeObject *code,*/
26074  __pyx_d, /*PyObject *globals,*/
26075  0 /*PyObject *locals*/
26076  );
26077  if (!py_frame) goto bad;
26078  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
26079  PyTraceBack_Here(py_frame);
26080 bad:
26081  Py_XDECREF(py_code);
26082  Py_XDECREF(py_frame);
26083 }
26084 
26085 #if PY_MAJOR_VERSION < 3
26086 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
26087  if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
26088  if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
26089  if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
26090  PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
26091  return -1;
26092 }
26093 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
26094  PyObject *obj = view->obj;
26095  if (!obj) return;
26096  if (PyObject_CheckBuffer(obj)) {
26097  PyBuffer_Release(view);
26098  return;
26099  }
26100  if ((0)) {}
26101  view->obj = NULL;
26102  Py_DECREF(obj);
26103 }
26104 #endif
26105 
26106 
26107 /* MemviewSliceIsContig */
26108 static int
26109 __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
26110 {
26111  int i, index, step, start;
26112  Py_ssize_t itemsize = mvs.memview->view.itemsize;
26113  if (order == 'F') {
26114  step = 1;
26115  start = 0;
26116  } else {
26117  step = -1;
26118  start = ndim - 1;
26119  }
26120  for (i = 0; i < ndim; i++) {
26121  index = start + step * i;
26122  if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
26123  return 0;
26124  itemsize *= mvs.shape[index];
26125  }
26126  return 1;
26127 }
26128 
26129 /* OverlappingSlices */
26130 static void
26131 __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
26132  void **out_start, void **out_end,
26133  int ndim, size_t itemsize)
26134 {
26135  char *start, *end;
26136  int i;
26137  start = end = slice->data;
26138  for (i = 0; i < ndim; i++) {
26139  Py_ssize_t stride = slice->strides[i];
26140  Py_ssize_t extent = slice->shape[i];
26141  if (extent == 0) {
26142  *out_start = *out_end = start;
26143  return;
26144  } else {
26145  if (stride > 0)
26146  end += stride * (extent - 1);
26147  else
26148  start += stride * (extent - 1);
26149  }
26150  }
26151  *out_start = start;
26152  *out_end = end + itemsize;
26153 }
26154 static int
26155 __pyx_slices_overlap(__Pyx_memviewslice *slice1,
26156  __Pyx_memviewslice *slice2,
26157  int ndim, size_t itemsize)
26158 {
26159  void *start1, *end1, *start2, *end2;
26160  __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
26161  __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
26162  return (start1 < end2) && (start2 < end1);
26163 }
26164 
26165 /* Capsule */
26166 static CYTHON_INLINE PyObject *
26167 __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
26168 {
26169  PyObject *cobj;
26170 #if PY_VERSION_HEX >= 0x02070000
26171  cobj = PyCapsule_New(p, sig, NULL);
26172 #else
26173  cobj = PyCObject_FromVoidPtr(p, NULL);
26174 #endif
26175  return cobj;
26176 }
26177 
26178 /* IsLittleEndian */
26179 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
26180 {
26181  union {
26182  uint32_t u32;
26183  uint8_t u8[4];
26184  } S;
26185  S.u32 = 0x01020304;
26186  return S.u8[0] == 4;
26187 }
26188 
26189 /* BufferFormatCheck */
26190 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
26191  __Pyx_BufFmt_StackElem* stack,
26192  __Pyx_TypeInfo* type) {
26193  stack[0].field = &ctx->root;
26194  stack[0].parent_offset = 0;
26195  ctx->root.type = type;
26196  ctx->root.name = "buffer dtype";
26197  ctx->root.offset = 0;
26198  ctx->head = stack;
26199  ctx->head->field = &ctx->root;
26200  ctx->fmt_offset = 0;
26201  ctx->head->parent_offset = 0;
26202  ctx->new_packmode = '@';
26203  ctx->enc_packmode = '@';
26204  ctx->new_count = 1;
26205  ctx->enc_count = 0;
26206  ctx->enc_type = 0;
26207  ctx->is_complex = 0;
26208  ctx->is_valid_array = 0;
26209  ctx->struct_alignment = 0;
26210  while (type->typegroup == 'S') {
26211  ++ctx->head;
26212  ctx->head->field = type->fields;
26213  ctx->head->parent_offset = 0;
26214  type = type->fields->type;
26215  }
26216 }
26217 static int __Pyx_BufFmt_ParseNumber(const char** ts) {
26218  int count;
26219  const char* t = *ts;
26220  if (*t < '0' || *t > '9') {
26221  return -1;
26222  } else {
26223  count = *t++ - '0';
26224  while (*t >= '0' && *t <= '9') {
26225  count *= 10;
26226  count += *t++ - '0';
26227  }
26228  }
26229  *ts = t;
26230  return count;
26231 }
26232 static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
26233  int number = __Pyx_BufFmt_ParseNumber(ts);
26234  if (number == -1)
26235  PyErr_Format(PyExc_ValueError,\
26236  "Does not understand character buffer dtype format string ('%c')", **ts);
26237  return number;
26238 }
26239 static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
26240  PyErr_Format(PyExc_ValueError,
26241  "Unexpected format string character: '%c'", ch);
26242 }
26243 static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
26244  switch (ch) {
26245  case '?': return "'bool'";
26246  case 'c': return "'char'";
26247  case 'b': return "'signed char'";
26248  case 'B': return "'unsigned char'";
26249  case 'h': return "'short'";
26250  case 'H': return "'unsigned short'";
26251  case 'i': return "'int'";
26252  case 'I': return "'unsigned int'";
26253  case 'l': return "'long'";
26254  case 'L': return "'unsigned long'";
26255  case 'q': return "'long long'";
26256  case 'Q': return "'unsigned long long'";
26257  case 'f': return (is_complex ? "'complex float'" : "'float'");
26258  case 'd': return (is_complex ? "'complex double'" : "'double'");
26259  case 'g': return (is_complex ? "'complex long double'" : "'long double'");
26260  case 'T': return "a struct";
26261  case 'O': return "Python object";
26262  case 'P': return "a pointer";
26263  case 's': case 'p': return "a string";
26264  case 0: return "end";
26265  default: return "unparseable format string";
26266  }
26267 }
26268 static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
26269  switch (ch) {
26270  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
26271  case 'h': case 'H': return 2;
26272  case 'i': case 'I': case 'l': case 'L': return 4;
26273  case 'q': case 'Q': return 8;
26274  case 'f': return (is_complex ? 8 : 4);
26275  case 'd': return (is_complex ? 16 : 8);
26276  case 'g': {
26277  PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
26278  return 0;
26279  }
26280  case 'O': case 'P': return sizeof(void*);
26281  default:
26282  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
26283  return 0;
26284  }
26285 }
26286 static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
26287  switch (ch) {
26288  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
26289  case 'h': case 'H': return sizeof(short);
26290  case 'i': case 'I': return sizeof(int);
26291  case 'l': case 'L': return sizeof(long);
26292  #ifdef HAVE_LONG_LONG
26293  case 'q': case 'Q': return sizeof(PY_LONG_LONG);
26294  #endif
26295  case 'f': return sizeof(float) * (is_complex ? 2 : 1);
26296  case 'd': return sizeof(double) * (is_complex ? 2 : 1);
26297  case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
26298  case 'O': case 'P': return sizeof(void*);
26299  default: {
26300  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
26301  return 0;
26302  }
26303  }
26304 }
26305 typedef struct { char c; short x; } __Pyx_st_short;
26306 typedef struct { char c; int x; } __Pyx_st_int;
26307 typedef struct { char c; long x; } __Pyx_st_long;
26308 typedef struct { char c; float x; } __Pyx_st_float;
26309 typedef struct { char c; double x; } __Pyx_st_double;
26310 typedef struct { char c; long double x; } __Pyx_st_longdouble;
26311 typedef struct { char c; void *x; } __Pyx_st_void_p;
26312 #ifdef HAVE_LONG_LONG
26313 typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
26314 #endif
26315 static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
26316  switch (ch) {
26317  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
26318  case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
26319  case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
26320  case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
26321 #ifdef HAVE_LONG_LONG
26322  case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
26323 #endif
26324  case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
26325  case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
26326  case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
26327  case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
26328  default:
26329  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
26330  return 0;
26331  }
26332 }
26333 /* These are for computing the padding at the end of the struct to align
26334  on the first member of the struct. This will probably the same as above,
26335  but we don't have any guarantees.
26336  */
26337 typedef struct { short x; char c; } __Pyx_pad_short;
26338 typedef struct { int x; char c; } __Pyx_pad_int;
26339 typedef struct { long x; char c; } __Pyx_pad_long;
26340 typedef struct { float x; char c; } __Pyx_pad_float;
26341 typedef struct { double x; char c; } __Pyx_pad_double;
26342 typedef struct { long double x; char c; } __Pyx_pad_longdouble;
26343 typedef struct { void *x; char c; } __Pyx_pad_void_p;
26344 #ifdef HAVE_LONG_LONG
26345 typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
26346 #endif
26347 static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
26348  switch (ch) {
26349  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
26350  case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
26351  case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
26352  case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
26353 #ifdef HAVE_LONG_LONG
26354  case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
26355 #endif
26356  case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
26357  case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
26358  case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
26359  case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
26360  default:
26361  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
26362  return 0;
26363  }
26364 }
26365 static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
26366  switch (ch) {
26367  case 'c':
26368  return 'H';
26369  case 'b': case 'h': case 'i':
26370  case 'l': case 'q': case 's': case 'p':
26371  return 'I';
26372  case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
26373  return 'U';
26374  case 'f': case 'd': case 'g':
26375  return (is_complex ? 'C' : 'R');
26376  case 'O':
26377  return 'O';
26378  case 'P':
26379  return 'P';
26380  default: {
26381  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
26382  return 0;
26383  }
26384  }
26385 }
26386 static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
26387  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
26388  const char* expected;
26389  const char* quote;
26390  if (ctx->head == NULL) {
26391  expected = "end";
26392  quote = "";
26393  } else {
26394  expected = ctx->head->field->type->name;
26395  quote = "'";
26396  }
26397  PyErr_Format(PyExc_ValueError,
26398  "Buffer dtype mismatch, expected %s%s%s but got %s",
26399  quote, expected, quote,
26400  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
26401  } else {
26402  __Pyx_StructField* field = ctx->head->field;
26403  __Pyx_StructField* parent = (ctx->head - 1)->field;
26404  PyErr_Format(PyExc_ValueError,
26405  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
26406  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
26407  parent->type->name, field->name);
26408  }
26409 }
26410 static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
26411  char group;
26412  size_t size, offset, arraysize = 1;
26413  if (ctx->enc_type == 0) return 0;
26414  if (ctx->head->field->type->arraysize[0]) {
26415  int i, ndim = 0;
26416  if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
26417  ctx->is_valid_array = ctx->head->field->type->ndim == 1;
26418  ndim = 1;
26419  if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
26420  PyErr_Format(PyExc_ValueError,
26421  "Expected a dimension of size %zu, got %zu",
26422  ctx->head->field->type->arraysize[0], ctx->enc_count);
26423  return -1;
26424  }
26425  }
26426  if (!ctx->is_valid_array) {
26427  PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
26428  ctx->head->field->type->ndim, ndim);
26429  return -1;
26430  }
26431  for (i = 0; i < ctx->head->field->type->ndim; i++) {
26432  arraysize *= ctx->head->field->type->arraysize[i];
26433  }
26434  ctx->is_valid_array = 0;
26435  ctx->enc_count = 1;
26436  }
26437  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
26438  do {
26439  __Pyx_StructField* field = ctx->head->field;
26440  __Pyx_TypeInfo* type = field->type;
26441  if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
26442  size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
26443  } else {
26444  size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
26445  }
26446  if (ctx->enc_packmode == '@') {
26447  size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
26448  size_t align_mod_offset;
26449  if (align_at == 0) return -1;
26450  align_mod_offset = ctx->fmt_offset % align_at;
26451  if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
26452  if (ctx->struct_alignment == 0)
26453  ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
26454  ctx->is_complex);
26455  }
26456  if (type->size != size || type->typegroup != group) {
26457  if (type->typegroup == 'C' && type->fields != NULL) {
26458  size_t parent_offset = ctx->head->parent_offset + field->offset;
26459  ++ctx->head;
26460  ctx->head->field = type->fields;
26461  ctx->head->parent_offset = parent_offset;
26462  continue;
26463  }
26464  if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
26465  } else {
26466  __Pyx_BufFmt_RaiseExpected(ctx);
26467  return -1;
26468  }
26469  }
26470  offset = ctx->head->parent_offset + field->offset;
26471  if (ctx->fmt_offset != offset) {
26472  PyErr_Format(PyExc_ValueError,
26473  "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
26474  (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
26475  return -1;
26476  }
26477  ctx->fmt_offset += size;
26478  if (arraysize)
26479  ctx->fmt_offset += (arraysize - 1) * size;
26480  --ctx->enc_count;
26481  while (1) {
26482  if (field == &ctx->root) {
26483  ctx->head = NULL;
26484  if (ctx->enc_count != 0) {
26485  __Pyx_BufFmt_RaiseExpected(ctx);
26486  return -1;
26487  }
26488  break;
26489  }
26490  ctx->head->field = ++field;
26491  if (field->type == NULL) {
26492  --ctx->head;
26493  field = ctx->head->field;
26494  continue;
26495  } else if (field->type->typegroup == 'S') {
26496  size_t parent_offset = ctx->head->parent_offset + field->offset;
26497  if (field->type->fields->type == NULL) continue;
26498  field = field->type->fields;
26499  ++ctx->head;
26500  ctx->head->field = field;
26501  ctx->head->parent_offset = parent_offset;
26502  break;
26503  } else {
26504  break;
26505  }
26506  }
26507  } while (ctx->enc_count);
26508  ctx->enc_type = 0;
26509  ctx->is_complex = 0;
26510  return 0;
26511 }
26512 static PyObject *
26513 __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
26514 {
26515  const char *ts = *tsp;
26516  int i = 0, number, ndim;
26517  ++ts;
26518  if (ctx->new_count != 1) {
26519  PyErr_SetString(PyExc_ValueError,
26520  "Cannot handle repeated arrays in format string");
26521  return NULL;
26522  }
26523  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26524  ndim = ctx->head->field->type->ndim;
26525  while (*ts && *ts != ')') {
26526  switch (*ts) {
26527  case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue;
26528  default: break;
26529  }
26530  number = __Pyx_BufFmt_ExpectNumber(&ts);
26531  if (number == -1) return NULL;
26532  if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
26533  return PyErr_Format(PyExc_ValueError,
26534  "Expected a dimension of size %zu, got %d",
26535  ctx->head->field->type->arraysize[i], number);
26536  if (*ts != ',' && *ts != ')')
26537  return PyErr_Format(PyExc_ValueError,
26538  "Expected a comma in format string, got '%c'", *ts);
26539  if (*ts == ',') ts++;
26540  i++;
26541  }
26542  if (i != ndim)
26543  return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
26544  ctx->head->field->type->ndim, i);
26545  if (!*ts) {
26546  PyErr_SetString(PyExc_ValueError,
26547  "Unexpected end of format string, expected ')'");
26548  return NULL;
26549  }
26550  ctx->is_valid_array = 1;
26551  ctx->new_count = 1;
26552  *tsp = ++ts;
26553  return Py_None;
26554 }
26555 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
26556  int got_Z = 0;
26557  while (1) {
26558  switch(*ts) {
26559  case 0:
26560  if (ctx->enc_type != 0 && ctx->head == NULL) {
26561  __Pyx_BufFmt_RaiseExpected(ctx);
26562  return NULL;
26563  }
26564  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26565  if (ctx->head != NULL) {
26566  __Pyx_BufFmt_RaiseExpected(ctx);
26567  return NULL;
26568  }
26569  return ts;
26570  case ' ':
26571  case '\r':
26572  case '\n':
26573  ++ts;
26574  break;
26575  case '<':
26576  if (!__Pyx_Is_Little_Endian()) {
26577  PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
26578  return NULL;
26579  }
26580  ctx->new_packmode = '=';
26581  ++ts;
26582  break;
26583  case '>':
26584  case '!':
26585  if (__Pyx_Is_Little_Endian()) {
26586  PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
26587  return NULL;
26588  }
26589  ctx->new_packmode = '=';
26590  ++ts;
26591  break;
26592  case '=':
26593  case '@':
26594  case '^':
26595  ctx->new_packmode = *ts++;
26596  break;
26597  case 'T':
26598  {
26599  const char* ts_after_sub;
26600  size_t i, struct_count = ctx->new_count;
26601  size_t struct_alignment = ctx->struct_alignment;
26602  ctx->new_count = 1;
26603  ++ts;
26604  if (*ts != '{') {
26605  PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
26606  return NULL;
26607  }
26608  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26609  ctx->enc_type = 0;
26610  ctx->enc_count = 0;
26611  ctx->struct_alignment = 0;
26612  ++ts;
26613  ts_after_sub = ts;
26614  for (i = 0; i != struct_count; ++i) {
26615  ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
26616  if (!ts_after_sub) return NULL;
26617  }
26618  ts = ts_after_sub;
26619  if (struct_alignment) ctx->struct_alignment = struct_alignment;
26620  }
26621  break;
26622  case '}':
26623  {
26624  size_t alignment = ctx->struct_alignment;
26625  ++ts;
26626  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26627  ctx->enc_type = 0;
26628  if (alignment && ctx->fmt_offset % alignment) {
26629  ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
26630  }
26631  }
26632  return ts;
26633  case 'x':
26634  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26635  ctx->fmt_offset += ctx->new_count;
26636  ctx->new_count = 1;
26637  ctx->enc_count = 0;
26638  ctx->enc_type = 0;
26639  ctx->enc_packmode = ctx->new_packmode;
26640  ++ts;
26641  break;
26642  case 'Z':
26643  got_Z = 1;
26644  ++ts;
26645  if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
26646  __Pyx_BufFmt_RaiseUnexpectedChar('Z');
26647  return NULL;
26648  }
26649  CYTHON_FALLTHROUGH;
26650  case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
26651  case 'l': case 'L': case 'q': case 'Q':
26652  case 'f': case 'd': case 'g':
26653  case 'O': case 'p':
26654  if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
26655  (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
26656  ctx->enc_count += ctx->new_count;
26657  ctx->new_count = 1;
26658  got_Z = 0;
26659  ++ts;
26660  break;
26661  }
26662  CYTHON_FALLTHROUGH;
26663  case 's':
26664  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
26665  ctx->enc_count = ctx->new_count;
26666  ctx->enc_packmode = ctx->new_packmode;
26667  ctx->enc_type = *ts;
26668  ctx->is_complex = got_Z;
26669  ++ts;
26670  ctx->new_count = 1;
26671  got_Z = 0;
26672  break;
26673  case ':':
26674  ++ts;
26675  while(*ts != ':') ++ts;
26676  ++ts;
26677  break;
26678  case '(':
26679  if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
26680  break;
26681  default:
26682  {
26683  int number = __Pyx_BufFmt_ExpectNumber(&ts);
26684  if (number == -1) return NULL;
26685  ctx->new_count = (size_t)number;
26686  }
26687  }
26688  }
26689 }
26690 
26691 /* TypeInfoCompare */
26692  static int
26693 __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
26694 {
26695  int i;
26696  if (!a || !b)
26697  return 0;
26698  if (a == b)
26699  return 1;
26700  if (a->size != b->size || a->typegroup != b->typegroup ||
26701  a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
26702  if (a->typegroup == 'H' || b->typegroup == 'H') {
26703  return a->size == b->size;
26704  } else {
26705  return 0;
26706  }
26707  }
26708  if (a->ndim) {
26709  for (i = 0; i < a->ndim; i++)
26710  if (a->arraysize[i] != b->arraysize[i])
26711  return 0;
26712  }
26713  if (a->typegroup == 'S') {
26714  if (a->flags != b->flags)
26715  return 0;
26716  if (a->fields || b->fields) {
26717  if (!(a->fields && b->fields))
26718  return 0;
26719  for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
26720  __Pyx_StructField *field_a = a->fields + i;
26721  __Pyx_StructField *field_b = b->fields + i;
26722  if (field_a->offset != field_b->offset ||
26723  !__pyx_typeinfo_cmp(field_a->type, field_b->type))
26724  return 0;
26725  }
26726  return !a->fields[i].type && !b->fields[i].type;
26727  }
26728  }
26729  return 1;
26730 }
26731 
26732 /* MemviewSliceValidateAndInit */
26733  static int
26734 __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
26735 {
26736  if (buf->shape[dim] <= 1)
26737  return 1;
26738  if (buf->strides) {
26739  if (spec & __Pyx_MEMVIEW_CONTIG) {
26740  if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
26741  if (unlikely(buf->strides[dim] != sizeof(void *))) {
26742  PyErr_Format(PyExc_ValueError,
26743  "Buffer is not indirectly contiguous "
26744  "in dimension %d.", dim);
26745  goto fail;
26746  }
26747  } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
26748  PyErr_SetString(PyExc_ValueError,
26749  "Buffer and memoryview are not contiguous "
26750  "in the same dimension.");
26751  goto fail;
26752  }
26753  }
26754  if (spec & __Pyx_MEMVIEW_FOLLOW) {
26755  Py_ssize_t stride = buf->strides[dim];
26756  if (stride < 0)
26757  stride = -stride;
26758  if (unlikely(stride < buf->itemsize)) {
26759  PyErr_SetString(PyExc_ValueError,
26760  "Buffer and memoryview are not contiguous "
26761  "in the same dimension.");
26762  goto fail;
26763  }
26764  }
26765  } else {
26766  if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
26767  PyErr_Format(PyExc_ValueError,
26768  "C-contiguous buffer is not contiguous in "
26769  "dimension %d", dim);
26770  goto fail;
26771  } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
26772  PyErr_Format(PyExc_ValueError,
26773  "C-contiguous buffer is not indirect in "
26774  "dimension %d", dim);
26775  goto fail;
26776  } else if (unlikely(buf->suboffsets)) {
26777  PyErr_SetString(PyExc_ValueError,
26778  "Buffer exposes suboffsets but no strides");
26779  goto fail;
26780  }
26781  }
26782  return 1;
26783 fail:
26784  return 0;
26785 }
26786 static int
26787 __pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec)
26788 {
26789  if (spec & __Pyx_MEMVIEW_DIRECT) {
26790  if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
26791  PyErr_Format(PyExc_ValueError,
26792  "Buffer not compatible with direct access "
26793  "in dimension %d.", dim);
26794  goto fail;
26795  }
26796  }
26797  if (spec & __Pyx_MEMVIEW_PTR) {
26798  if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
26799  PyErr_Format(PyExc_ValueError,
26800  "Buffer is not indirectly accessible "
26801  "in dimension %d.", dim);
26802  goto fail;
26803  }
26804  }
26805  return 1;
26806 fail:
26807  return 0;
26808 }
26809 static int
26810 __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
26811 {
26812  int i;
26813  if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
26814  Py_ssize_t stride = 1;
26815  for (i = 0; i < ndim; i++) {
26816  if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) {
26817  PyErr_SetString(PyExc_ValueError,
26818  "Buffer not fortran contiguous.");
26819  goto fail;
26820  }
26821  stride = stride * buf->shape[i];
26822  }
26823  } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
26824  Py_ssize_t stride = 1;
26825  for (i = ndim - 1; i >- 1; i--) {
26826  if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) {
26827  PyErr_SetString(PyExc_ValueError,
26828  "Buffer not C contiguous.");
26829  goto fail;
26830  }
26831  stride = stride * buf->shape[i];
26832  }
26833  }
26834  return 1;
26835 fail:
26836  return 0;
26837 }
26838 static int __Pyx_ValidateAndInit_memviewslice(
26839  int *axes_specs,
26840  int c_or_f_flag,
26841  int buf_flags,
26842  int ndim,
26843  __Pyx_TypeInfo *dtype,
26844  __Pyx_BufFmt_StackElem stack[],
26845  __Pyx_memviewslice *memviewslice,
26846  PyObject *original_obj)
26847 {
26848  struct __pyx_memoryview_obj *memview, *new_memview;
26849  __Pyx_RefNannyDeclarations
26850  Py_buffer *buf;
26851  int i, spec = 0, retval = -1;
26852  __Pyx_BufFmt_Context ctx;
26853  int from_memoryview = __pyx_memoryview_check(original_obj);
26854  __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
26855  if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
26856  original_obj)->typeinfo)) {
26857  memview = (struct __pyx_memoryview_obj *) original_obj;
26858  new_memview = NULL;
26859  } else {
26860  memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
26861  original_obj, buf_flags, 0, dtype);
26862  new_memview = memview;
26863  if (unlikely(!memview))
26864  goto fail;
26865  }
26866  buf = &memview->view;
26867  if (unlikely(buf->ndim != ndim)) {
26868  PyErr_Format(PyExc_ValueError,
26869  "Buffer has wrong number of dimensions (expected %d, got %d)",
26870  ndim, buf->ndim);
26871  goto fail;
26872  }
26873  if (new_memview) {
26874  __Pyx_BufFmt_Init(&ctx, stack, dtype);
26875  if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
26876  }
26877  if (unlikely((unsigned) buf->itemsize != dtype->size)) {
26878  PyErr_Format(PyExc_ValueError,
26879  "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
26880  "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
26881  buf->itemsize,
26882  (buf->itemsize > 1) ? "s" : "",
26883  dtype->name,
26884  dtype->size,
26885  (dtype->size > 1) ? "s" : "");
26886  goto fail;
26887  }
26888  if (buf->len > 0) {
26889  for (i = 0; i < ndim; i++) {
26890  spec = axes_specs[i];
26891  if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
26892  goto fail;
26893  if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
26894  goto fail;
26895  }
26896  if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
26897  goto fail;
26898  }
26899  if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
26900  new_memview != NULL) == -1)) {
26901  goto fail;
26902  }
26903  retval = 0;
26904  goto no_fail;
26905 fail:
26906  Py_XDECREF(new_memview);
26907  retval = -1;
26908 no_fail:
26909  __Pyx_RefNannyFinishContext();
26910  return retval;
26911 }
26912 
26913 /* ObjectToMemviewSlice */
26914  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_float(PyObject *obj, int writable_flag) {
26915  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
26916  __Pyx_BufFmt_StackElem stack[1];
26917  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
26918  int retcode;
26919  if (obj == Py_None) {
26920  result.memview = (struct __pyx_memoryview_obj *) Py_None;
26921  return result;
26922  }
26923  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
26924  PyBUF_RECORDS_RO | writable_flag, 1,
26925  &__Pyx_TypeInfo_float, stack,
26926  &result, obj);
26927  if (unlikely(retcode == -1))
26928  goto __pyx_fail;
26929  return result;
26930 __pyx_fail:
26931  result.memview = NULL;
26932  result.data = NULL;
26933  return result;
26934 }
26935 
26936 /* ObjectToMemviewSlice */
26937  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *obj, int writable_flag) {
26938  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
26939  __Pyx_BufFmt_StackElem stack[1];
26940  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
26941  int retcode;
26942  if (obj == Py_None) {
26943  result.memview = (struct __pyx_memoryview_obj *) Py_None;
26944  return result;
26945  }
26946  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
26947  PyBUF_RECORDS_RO | writable_flag, 1,
26948  &__Pyx_TypeInfo_double, stack,
26949  &result, obj);
26950  if (unlikely(retcode == -1))
26951  goto __pyx_fail;
26952  return result;
26953 __pyx_fail:
26954  result.memview = NULL;
26955  result.data = NULL;
26956  return result;
26957 }
26958 
26959 /* ObjectToMemviewSlice */
26960  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_long__double(PyObject *obj, int writable_flag) {
26961  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
26962  __Pyx_BufFmt_StackElem stack[1];
26963  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
26964  int retcode;
26965  if (obj == Py_None) {
26966  result.memview = (struct __pyx_memoryview_obj *) Py_None;
26967  return result;
26968  }
26969  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
26970  PyBUF_RECORDS_RO | writable_flag, 1,
26971  &__Pyx_TypeInfo_long__double, stack,
26972  &result, obj);
26973  if (unlikely(retcode == -1))
26974  goto __pyx_fail;
26975  return result;
26976 __pyx_fail:
26977  result.memview = NULL;
26978  result.data = NULL;
26979  return result;
26980 }
26981 
26982 /* MemviewSliceCopyTemplate */
26983  static __Pyx_memviewslice
26984 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
26985  const char *mode, int ndim,
26986  size_t sizeof_dtype, int contig_flag,
26987  int dtype_is_object)
26988 {
26989  __Pyx_RefNannyDeclarations
26990  int i;
26991  __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
26992  struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
26993  Py_buffer *buf = &from_memview->view;
26994  PyObject *shape_tuple = NULL;
26995  PyObject *temp_int = NULL;
26996  struct __pyx_array_obj *array_obj = NULL;
26997  struct __pyx_memoryview_obj *memview_obj = NULL;
26998  __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
26999  for (i = 0; i < ndim; i++) {
27000  if (unlikely(from_mvs->suboffsets[i] >= 0)) {
27001  PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
27002  "indirect dimensions (axis %d)", i);
27003  goto fail;
27004  }
27005  }
27006  shape_tuple = PyTuple_New(ndim);
27007  if (unlikely(!shape_tuple)) {
27008  goto fail;
27009  }
27010  __Pyx_GOTREF(shape_tuple);
27011  for(i = 0; i < ndim; i++) {
27012  temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
27013  if(unlikely(!temp_int)) {
27014  goto fail;
27015  } else {
27016  PyTuple_SET_ITEM(shape_tuple, i, temp_int);
27017  temp_int = NULL;
27018  }
27019  }
27020  array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
27021  if (unlikely(!array_obj)) {
27022  goto fail;
27023  }
27024  __Pyx_GOTREF(array_obj);
27025  memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
27026  (PyObject *) array_obj, contig_flag,
27027  dtype_is_object,
27028  from_mvs->memview->typeinfo);
27029  if (unlikely(!memview_obj))
27030  goto fail;
27031  if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
27032  goto fail;
27033  if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
27034  dtype_is_object) < 0))
27035  goto fail;
27036  goto no_fail;
27037 fail:
27038  __Pyx_XDECREF(new_mvs.memview);
27039  new_mvs.memview = NULL;
27040  new_mvs.data = NULL;
27041 no_fail:
27042  __Pyx_XDECREF(shape_tuple);
27043  __Pyx_XDECREF(temp_int);
27044  __Pyx_XDECREF(array_obj);
27045  __Pyx_RefNannyFinishContext();
27046  return new_mvs;
27047 }
27048 
27049 /* CIntToPy */
27050  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
27051 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27052 #pragma GCC diagnostic push
27053 #pragma GCC diagnostic ignored "-Wconversion"
27054 #endif
27055  const int neg_one = (int) -1, const_zero = (int) 0;
27056 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27057 #pragma GCC diagnostic pop
27058 #endif
27059  const int is_unsigned = neg_one > const_zero;
27060  if (is_unsigned) {
27061  if (sizeof(int) < sizeof(long)) {
27062  return PyInt_FromLong((long) value);
27063  } else if (sizeof(int) <= sizeof(unsigned long)) {
27064  return PyLong_FromUnsignedLong((unsigned long) value);
27065 #ifdef HAVE_LONG_LONG
27066  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
27067  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
27068 #endif
27069  }
27070  } else {
27071  if (sizeof(int) <= sizeof(long)) {
27072  return PyInt_FromLong((long) value);
27073 #ifdef HAVE_LONG_LONG
27074  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
27075  return PyLong_FromLongLong((PY_LONG_LONG) value);
27076 #endif
27077  }
27078  }
27079  {
27080  int one = 1; int little = (int)*(unsigned char *)&one;
27081  unsigned char *bytes = (unsigned char *)&value;
27082  return _PyLong_FromByteArray(bytes, sizeof(int),
27083  little, !is_unsigned);
27084  }
27085 }
27086 
27087 /* CIntFromPyVerify */
27088  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
27089  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
27090 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
27091  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
27092 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
27093  {\
27094  func_type value = func_value;\
27095  if (sizeof(target_type) < sizeof(func_type)) {\
27096  if (unlikely(value != (func_type) (target_type) value)) {\
27097  func_type zero = 0;\
27098  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
27099  return (target_type) -1;\
27100  if (is_unsigned && unlikely(value < zero))\
27101  goto raise_neg_overflow;\
27102  else\
27103  goto raise_overflow;\
27104  }\
27105  }\
27106  return (target_type) value;\
27107  }
27108 
27109 /* CIntFromPy */
27110  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
27111 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27112 #pragma GCC diagnostic push
27113 #pragma GCC diagnostic ignored "-Wconversion"
27114 #endif
27115  const int neg_one = (int) -1, const_zero = (int) 0;
27116 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27117 #pragma GCC diagnostic pop
27118 #endif
27119  const int is_unsigned = neg_one > const_zero;
27120 #if PY_MAJOR_VERSION < 3
27121  if (likely(PyInt_Check(x))) {
27122  if (sizeof(int) < sizeof(long)) {
27123  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
27124  } else {
27125  long val = PyInt_AS_LONG(x);
27126  if (is_unsigned && unlikely(val < 0)) {
27127  goto raise_neg_overflow;
27128  }
27129  return (int) val;
27130  }
27131  } else
27132 #endif
27133  if (likely(PyLong_Check(x))) {
27134  if (is_unsigned) {
27135 #if CYTHON_USE_PYLONG_INTERNALS
27136  const digit* digits = ((PyLongObject*)x)->ob_digit;
27137  switch (Py_SIZE(x)) {
27138  case 0: return (int) 0;
27139  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
27140  case 2:
27141  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
27142  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27143  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27144  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
27145  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
27146  }
27147  }
27148  break;
27149  case 3:
27150  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
27151  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27152  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27153  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
27154  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
27155  }
27156  }
27157  break;
27158  case 4:
27159  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
27160  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27161  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27162  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
27163  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
27164  }
27165  }
27166  break;
27167  }
27168 #endif
27169 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
27170  if (unlikely(Py_SIZE(x) < 0)) {
27171  goto raise_neg_overflow;
27172  }
27173 #else
27174  {
27175  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
27176  if (unlikely(result < 0))
27177  return (int) -1;
27178  if (unlikely(result == 1))
27179  goto raise_neg_overflow;
27180  }
27181 #endif
27182  if (sizeof(int) <= sizeof(unsigned long)) {
27183  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
27184 #ifdef HAVE_LONG_LONG
27185  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
27186  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
27187 #endif
27188  }
27189  } else {
27190 #if CYTHON_USE_PYLONG_INTERNALS
27191  const digit* digits = ((PyLongObject*)x)->ob_digit;
27192  switch (Py_SIZE(x)) {
27193  case 0: return (int) 0;
27194  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
27195  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
27196  case -2:
27197  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
27198  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27199  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27200  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
27201  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27202  }
27203  }
27204  break;
27205  case 2:
27206  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
27207  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27208  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27209  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
27210  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27211  }
27212  }
27213  break;
27214  case -3:
27215  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
27216  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27217  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27218  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
27219  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27220  }
27221  }
27222  break;
27223  case 3:
27224  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
27225  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27226  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27227  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
27228  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27229  }
27230  }
27231  break;
27232  case -4:
27233  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
27234  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27235  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27236  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
27237  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27238  }
27239  }
27240  break;
27241  case 4:
27242  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
27243  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27244  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27245  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
27246  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
27247  }
27248  }
27249  break;
27250  }
27251 #endif
27252  if (sizeof(int) <= sizeof(long)) {
27253  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
27254 #ifdef HAVE_LONG_LONG
27255  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
27256  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
27257 #endif
27258  }
27259  }
27260  {
27261 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
27262  PyErr_SetString(PyExc_RuntimeError,
27263  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
27264 #else
27265  int val;
27266  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
27267  #if PY_MAJOR_VERSION < 3
27268  if (likely(v) && !PyLong_Check(v)) {
27269  PyObject *tmp = v;
27270  v = PyNumber_Long(tmp);
27271  Py_DECREF(tmp);
27272  }
27273  #endif
27274  if (likely(v)) {
27275  int one = 1; int is_little = (int)*(unsigned char *)&one;
27276  unsigned char *bytes = (unsigned char *)&val;
27277  int ret = _PyLong_AsByteArray((PyLongObject *)v,
27278  bytes, sizeof(val),
27279  is_little, !is_unsigned);
27280  Py_DECREF(v);
27281  if (likely(!ret))
27282  return val;
27283  }
27284 #endif
27285  return (int) -1;
27286  }
27287  } else {
27288  int val;
27289  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
27290  if (!tmp) return (int) -1;
27291  val = __Pyx_PyInt_As_int(tmp);
27292  Py_DECREF(tmp);
27293  return val;
27294  }
27295 raise_overflow:
27296  PyErr_SetString(PyExc_OverflowError,
27297  "value too large to convert to int");
27298  return (int) -1;
27299 raise_neg_overflow:
27300  PyErr_SetString(PyExc_OverflowError,
27301  "can't convert negative value to int");
27302  return (int) -1;
27303 }
27304 
27305 /* CIntFromPy */
27306  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
27307 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27308 #pragma GCC diagnostic push
27309 #pragma GCC diagnostic ignored "-Wconversion"
27310 #endif
27311  const long neg_one = (long) -1, const_zero = (long) 0;
27312 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27313 #pragma GCC diagnostic pop
27314 #endif
27315  const int is_unsigned = neg_one > const_zero;
27316 #if PY_MAJOR_VERSION < 3
27317  if (likely(PyInt_Check(x))) {
27318  if (sizeof(long) < sizeof(long)) {
27319  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
27320  } else {
27321  long val = PyInt_AS_LONG(x);
27322  if (is_unsigned && unlikely(val < 0)) {
27323  goto raise_neg_overflow;
27324  }
27325  return (long) val;
27326  }
27327  } else
27328 #endif
27329  if (likely(PyLong_Check(x))) {
27330  if (is_unsigned) {
27331 #if CYTHON_USE_PYLONG_INTERNALS
27332  const digit* digits = ((PyLongObject*)x)->ob_digit;
27333  switch (Py_SIZE(x)) {
27334  case 0: return (long) 0;
27335  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
27336  case 2:
27337  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
27338  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27339  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27340  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
27341  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
27342  }
27343  }
27344  break;
27345  case 3:
27346  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
27347  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27348  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27349  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
27350  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
27351  }
27352  }
27353  break;
27354  case 4:
27355  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
27356  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27357  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27358  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
27359  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
27360  }
27361  }
27362  break;
27363  }
27364 #endif
27365 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
27366  if (unlikely(Py_SIZE(x) < 0)) {
27367  goto raise_neg_overflow;
27368  }
27369 #else
27370  {
27371  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
27372  if (unlikely(result < 0))
27373  return (long) -1;
27374  if (unlikely(result == 1))
27375  goto raise_neg_overflow;
27376  }
27377 #endif
27378  if (sizeof(long) <= sizeof(unsigned long)) {
27379  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
27380 #ifdef HAVE_LONG_LONG
27381  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
27382  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
27383 #endif
27384  }
27385  } else {
27386 #if CYTHON_USE_PYLONG_INTERNALS
27387  const digit* digits = ((PyLongObject*)x)->ob_digit;
27388  switch (Py_SIZE(x)) {
27389  case 0: return (long) 0;
27390  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
27391  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
27392  case -2:
27393  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
27394  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27395  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27396  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
27397  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27398  }
27399  }
27400  break;
27401  case 2:
27402  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
27403  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27404  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27405  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
27406  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27407  }
27408  }
27409  break;
27410  case -3:
27411  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
27412  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27413  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27414  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
27415  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27416  }
27417  }
27418  break;
27419  case 3:
27420  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
27421  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27422  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27423  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
27424  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27425  }
27426  }
27427  break;
27428  case -4:
27429  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
27430  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27431  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27432  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
27433  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27434  }
27435  }
27436  break;
27437  case 4:
27438  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
27439  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27440  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27441  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
27442  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
27443  }
27444  }
27445  break;
27446  }
27447 #endif
27448  if (sizeof(long) <= sizeof(long)) {
27449  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
27450 #ifdef HAVE_LONG_LONG
27451  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
27452  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
27453 #endif
27454  }
27455  }
27456  {
27457 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
27458  PyErr_SetString(PyExc_RuntimeError,
27459  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
27460 #else
27461  long val;
27462  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
27463  #if PY_MAJOR_VERSION < 3
27464  if (likely(v) && !PyLong_Check(v)) {
27465  PyObject *tmp = v;
27466  v = PyNumber_Long(tmp);
27467  Py_DECREF(tmp);
27468  }
27469  #endif
27470  if (likely(v)) {
27471  int one = 1; int is_little = (int)*(unsigned char *)&one;
27472  unsigned char *bytes = (unsigned char *)&val;
27473  int ret = _PyLong_AsByteArray((PyLongObject *)v,
27474  bytes, sizeof(val),
27475  is_little, !is_unsigned);
27476  Py_DECREF(v);
27477  if (likely(!ret))
27478  return val;
27479  }
27480 #endif
27481  return (long) -1;
27482  }
27483  } else {
27484  long val;
27485  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
27486  if (!tmp) return (long) -1;
27487  val = __Pyx_PyInt_As_long(tmp);
27488  Py_DECREF(tmp);
27489  return val;
27490  }
27491 raise_overflow:
27492  PyErr_SetString(PyExc_OverflowError,
27493  "value too large to convert to long");
27494  return (long) -1;
27495 raise_neg_overflow:
27496  PyErr_SetString(PyExc_OverflowError,
27497  "can't convert negative value to long");
27498  return (long) -1;
27499 }
27500 
27501 /* CIntToPy */
27502  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
27503 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27504 #pragma GCC diagnostic push
27505 #pragma GCC diagnostic ignored "-Wconversion"
27506 #endif
27507  const long neg_one = (long) -1, const_zero = (long) 0;
27508 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27509 #pragma GCC diagnostic pop
27510 #endif
27511  const int is_unsigned = neg_one > const_zero;
27512  if (is_unsigned) {
27513  if (sizeof(long) < sizeof(long)) {
27514  return PyInt_FromLong((long) value);
27515  } else if (sizeof(long) <= sizeof(unsigned long)) {
27516  return PyLong_FromUnsignedLong((unsigned long) value);
27517 #ifdef HAVE_LONG_LONG
27518  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
27519  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
27520 #endif
27521  }
27522  } else {
27523  if (sizeof(long) <= sizeof(long)) {
27524  return PyInt_FromLong((long) value);
27525 #ifdef HAVE_LONG_LONG
27526  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
27527  return PyLong_FromLongLong((PY_LONG_LONG) value);
27528 #endif
27529  }
27530  }
27531  {
27532  int one = 1; int little = (int)*(unsigned char *)&one;
27533  unsigned char *bytes = (unsigned char *)&value;
27534  return _PyLong_FromByteArray(bytes, sizeof(long),
27535  little, !is_unsigned);
27536  }
27537 }
27538 
27539 /* CIntFromPy */
27540  static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
27541 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27542 #pragma GCC diagnostic push
27543 #pragma GCC diagnostic ignored "-Wconversion"
27544 #endif
27545  const char neg_one = (char) -1, const_zero = (char) 0;
27546 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
27547 #pragma GCC diagnostic pop
27548 #endif
27549  const int is_unsigned = neg_one > const_zero;
27550 #if PY_MAJOR_VERSION < 3
27551  if (likely(PyInt_Check(x))) {
27552  if (sizeof(char) < sizeof(long)) {
27553  __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
27554  } else {
27555  long val = PyInt_AS_LONG(x);
27556  if (is_unsigned && unlikely(val < 0)) {
27557  goto raise_neg_overflow;
27558  }
27559  return (char) val;
27560  }
27561  } else
27562 #endif
27563  if (likely(PyLong_Check(x))) {
27564  if (is_unsigned) {
27565 #if CYTHON_USE_PYLONG_INTERNALS
27566  const digit* digits = ((PyLongObject*)x)->ob_digit;
27567  switch (Py_SIZE(x)) {
27568  case 0: return (char) 0;
27569  case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
27570  case 2:
27571  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
27572  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27573  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27574  } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
27575  return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
27576  }
27577  }
27578  break;
27579  case 3:
27580  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
27581  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27582  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27583  } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
27584  return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
27585  }
27586  }
27587  break;
27588  case 4:
27589  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
27590  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27591  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27592  } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
27593  return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
27594  }
27595  }
27596  break;
27597  }
27598 #endif
27599 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
27600  if (unlikely(Py_SIZE(x) < 0)) {
27601  goto raise_neg_overflow;
27602  }
27603 #else
27604  {
27605  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
27606  if (unlikely(result < 0))
27607  return (char) -1;
27608  if (unlikely(result == 1))
27609  goto raise_neg_overflow;
27610  }
27611 #endif
27612  if (sizeof(char) <= sizeof(unsigned long)) {
27613  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
27614 #ifdef HAVE_LONG_LONG
27615  } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
27616  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
27617 #endif
27618  }
27619  } else {
27620 #if CYTHON_USE_PYLONG_INTERNALS
27621  const digit* digits = ((PyLongObject*)x)->ob_digit;
27622  switch (Py_SIZE(x)) {
27623  case 0: return (char) 0;
27624  case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
27625  case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0])
27626  case -2:
27627  if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
27628  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27629  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27630  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
27631  return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27632  }
27633  }
27634  break;
27635  case 2:
27636  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
27637  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
27638  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27639  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
27640  return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27641  }
27642  }
27643  break;
27644  case -3:
27645  if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
27646  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27647  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27648  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
27649  return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27650  }
27651  }
27652  break;
27653  case 3:
27654  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
27655  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
27656  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27657  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
27658  return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27659  }
27660  }
27661  break;
27662  case -4:
27663  if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
27664  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27665  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27666  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
27667  return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27668  }
27669  }
27670  break;
27671  case 4:
27672  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
27673  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
27674  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
27675  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
27676  return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
27677  }
27678  }
27679  break;
27680  }
27681 #endif
27682  if (sizeof(char) <= sizeof(long)) {
27683  __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
27684 #ifdef HAVE_LONG_LONG
27685  } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
27686  __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
27687 #endif
27688  }
27689  }
27690  {
27691 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
27692  PyErr_SetString(PyExc_RuntimeError,
27693  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
27694 #else
27695  char val;
27696  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
27697  #if PY_MAJOR_VERSION < 3
27698  if (likely(v) && !PyLong_Check(v)) {
27699  PyObject *tmp = v;
27700  v = PyNumber_Long(tmp);
27701  Py_DECREF(tmp);
27702  }
27703  #endif
27704  if (likely(v)) {
27705  int one = 1; int is_little = (int)*(unsigned char *)&one;
27706  unsigned char *bytes = (unsigned char *)&val;
27707  int ret = _PyLong_AsByteArray((PyLongObject *)v,
27708  bytes, sizeof(val),
27709  is_little, !is_unsigned);
27710  Py_DECREF(v);
27711  if (likely(!ret))
27712  return val;
27713  }
27714 #endif
27715  return (char) -1;
27716  }
27717  } else {
27718  char val;
27719  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
27720  if (!tmp) return (char) -1;
27721  val = __Pyx_PyInt_As_char(tmp);
27722  Py_DECREF(tmp);
27723  return val;
27724  }
27725 raise_overflow:
27726  PyErr_SetString(PyExc_OverflowError,
27727  "value too large to convert to char");
27728  return (char) -1;
27729 raise_neg_overflow:
27730  PyErr_SetString(PyExc_OverflowError,
27731  "can't convert negative value to char");
27732  return (char) -1;
27733 }
27734 
27735 /* CheckBinaryVersion */
27736  static int __Pyx_check_binary_version(void) {
27737  char ctversion[5];
27738  int same=1, i, found_dot;
27739  const char* rt_from_call = Py_GetVersion();
27740  PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
27741  found_dot = 0;
27742  for (i = 0; i < 4; i++) {
27743  if (!ctversion[i]) {
27744  same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
27745  break;
27746  }
27747  if (rt_from_call[i] != ctversion[i]) {
27748  same = 0;
27749  break;
27750  }
27751  }
27752  if (!same) {
27753  char rtversion[5] = {'\0'};
27754  char message[200];
27755  for (i=0; i<4; ++i) {
27756  if (rt_from_call[i] == '.') {
27757  if (found_dot) break;
27758  found_dot = 1;
27759  } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
27760  break;
27761  }
27762  rtversion[i] = rt_from_call[i];
27763  }
27764  PyOS_snprintf(message, sizeof(message),
27765  "compiletime version %s of module '%.100s' "
27766  "does not match runtime version %s",
27767  ctversion, __Pyx_MODULE_NAME, rtversion);
27768  return PyErr_WarnEx(NULL, message, 1);
27769  }
27770  return 0;
27771 }
27772 
27773 /* InitStrings */
27774  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
27775  while (t->p) {
27776  #if PY_MAJOR_VERSION < 3
27777  if (t->is_unicode) {
27778  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
27779  } else if (t->intern) {
27780  *t->p = PyString_InternFromString(t->s);
27781  } else {
27782  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
27783  }
27784  #else
27785  if (t->is_unicode | t->is_str) {
27786  if (t->intern) {
27787  *t->p = PyUnicode_InternFromString(t->s);
27788  } else if (t->encoding) {
27789  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
27790  } else {
27791  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
27792  }
27793  } else {
27794  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
27795  }
27796  #endif
27797  if (!*t->p)
27798  return -1;
27799  if (PyObject_Hash(*t->p) == -1)
27800  return -1;
27801  ++t;
27802  }
27803  return 0;
27804 }
27805 
27806 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
27807  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
27808 }
27809 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
27810  Py_ssize_t ignore;
27811  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
27812 }
27813 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
27814 #if !CYTHON_PEP393_ENABLED
27815 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
27816  char* defenc_c;
27817  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
27818  if (!defenc) return NULL;
27819  defenc_c = PyBytes_AS_STRING(defenc);
27820 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
27821  {
27822  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
27823  char* c;
27824  for (c = defenc_c; c < end; c++) {
27825  if ((unsigned char) (*c) >= 128) {
27826  PyUnicode_AsASCIIString(o);
27827  return NULL;
27828  }
27829  }
27830  }
27831 #endif
27832  *length = PyBytes_GET_SIZE(defenc);
27833  return defenc_c;
27834 }
27835 #else
27836 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
27837  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
27838 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
27839  if (likely(PyUnicode_IS_ASCII(o))) {
27840  *length = PyUnicode_GET_LENGTH(o);
27841  return PyUnicode_AsUTF8(o);
27842  } else {
27843  PyUnicode_AsASCIIString(o);
27844  return NULL;
27845  }
27846 #else
27847  return PyUnicode_AsUTF8AndSize(o, length);
27848 #endif
27849 }
27850 #endif
27851 #endif
27852 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
27853 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
27854  if (
27855 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
27856  __Pyx_sys_getdefaultencoding_not_ascii &&
27857 #endif
27858  PyUnicode_Check(o)) {
27859  return __Pyx_PyUnicode_AsStringAndSize(o, length);
27860  } else
27861 #endif
27862 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
27863  if (PyByteArray_Check(o)) {
27864  *length = PyByteArray_GET_SIZE(o);
27865  return PyByteArray_AS_STRING(o);
27866  } else
27867 #endif
27868  {
27869  char* result;
27870  int r = PyBytes_AsStringAndSize(o, &result, length);
27871  if (unlikely(r < 0)) {
27872  return NULL;
27873  } else {
27874  return result;
27875  }
27876  }
27877 }
27878 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
27879  int is_true = x == Py_True;
27880  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
27881  else return PyObject_IsTrue(x);
27882 }
27883 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
27884  int retval;
27885  if (unlikely(!x)) return -1;
27886  retval = __Pyx_PyObject_IsTrue(x);
27887  Py_DECREF(x);
27888  return retval;
27889 }
27890 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
27891 #if PY_MAJOR_VERSION >= 3
27892  if (PyLong_Check(result)) {
27893  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
27894  "__int__ returned non-int (type %.200s). "
27895  "The ability to return an instance of a strict subclass of int "
27896  "is deprecated, and may be removed in a future version of Python.",
27897  Py_TYPE(result)->tp_name)) {
27898  Py_DECREF(result);
27899  return NULL;
27900  }
27901  return result;
27902  }
27903 #endif
27904  PyErr_Format(PyExc_TypeError,
27905  "__%.4s__ returned non-%.4s (type %.200s)",
27906  type_name, type_name, Py_TYPE(result)->tp_name);
27907  Py_DECREF(result);
27908  return NULL;
27909 }
27910 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
27911 #if CYTHON_USE_TYPE_SLOTS
27912  PyNumberMethods *m;
27913 #endif
27914  const char *name = NULL;
27915  PyObject *res = NULL;
27916 #if PY_MAJOR_VERSION < 3
27917  if (likely(PyInt_Check(x) || PyLong_Check(x)))
27918 #else
27919  if (likely(PyLong_Check(x)))
27920 #endif
27921  return __Pyx_NewRef(x);
27922 #if CYTHON_USE_TYPE_SLOTS
27923  m = Py_TYPE(x)->tp_as_number;
27924  #if PY_MAJOR_VERSION < 3
27925  if (m && m->nb_int) {
27926  name = "int";
27927  res = m->nb_int(x);
27928  }
27929  else if (m && m->nb_long) {
27930  name = "long";
27931  res = m->nb_long(x);
27932  }
27933  #else
27934  if (likely(m && m->nb_int)) {
27935  name = "int";
27936  res = m->nb_int(x);
27937  }
27938  #endif
27939 #else
27940  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
27941  res = PyNumber_Int(x);
27942  }
27943 #endif
27944  if (likely(res)) {
27945 #if PY_MAJOR_VERSION < 3
27946  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
27947 #else
27948  if (unlikely(!PyLong_CheckExact(res))) {
27949 #endif
27950  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
27951  }
27952  }
27953  else if (!PyErr_Occurred()) {
27954  PyErr_SetString(PyExc_TypeError,
27955  "an integer is required");
27956  }
27957  return res;
27958 }
27959 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
27960  Py_ssize_t ival;
27961  PyObject *x;
27962 #if PY_MAJOR_VERSION < 3
27963  if (likely(PyInt_CheckExact(b))) {
27964  if (sizeof(Py_ssize_t) >= sizeof(long))
27965  return PyInt_AS_LONG(b);
27966  else
27967  return PyInt_AsSsize_t(b);
27968  }
27969 #endif
27970  if (likely(PyLong_CheckExact(b))) {
27971  #if CYTHON_USE_PYLONG_INTERNALS
27972  const digit* digits = ((PyLongObject*)b)->ob_digit;
27973  const Py_ssize_t size = Py_SIZE(b);
27974  if (likely(__Pyx_sst_abs(size) <= 1)) {
27975  ival = likely(size) ? digits[0] : 0;
27976  if (size == -1) ival = -ival;
27977  return ival;
27978  } else {
27979  switch (size) {
27980  case 2:
27981  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
27982  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
27983  }
27984  break;
27985  case -2:
27986  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
27987  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
27988  }
27989  break;
27990  case 3:
27991  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
27992  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
27993  }
27994  break;
27995  case -3:
27996  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
27997  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
27998  }
27999  break;
28000  case 4:
28001  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
28002  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
28003  }
28004  break;
28005  case -4:
28006  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
28007  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
28008  }
28009  break;
28010  }
28011  }
28012  #endif
28013  return PyLong_AsSsize_t(b);
28014  }
28015  x = PyNumber_Index(b);
28016  if (!x) return -1;
28017  ival = PyInt_AsSsize_t(x);
28018  Py_DECREF(x);
28019  return ival;
28020 }
28021 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
28022  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
28023  return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
28024 #if PY_MAJOR_VERSION < 3
28025  } else if (likely(PyInt_CheckExact(o))) {
28026  return PyInt_AS_LONG(o);
28027 #endif
28028  } else {
28029  Py_ssize_t ival;
28030  PyObject *x;
28031  x = PyNumber_Index(o);
28032  if (!x) return -1;
28033  ival = PyInt_AsLong(x);
28034  Py_DECREF(x);
28035  return ival;
28036  }
28037 }
28038 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
28039  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
28040 }
28041 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
28042  return PyInt_FromSize_t(ival);
28043 }
28044 
28045 
28046 #endif /* Py_PYTHON_H */
Base class for linear operators. This class serves as interface for all derived classes.